{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Games.Leaderboards.List
(
LeaderboardsListResource
, leaderboardsList
, LeaderboardsList
, llLanguage
, llPageToken
, llMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type LeaderboardsListResource =
"games" :>
"v1" :>
"leaderboards" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LeaderboardListResponse
data LeaderboardsList = LeaderboardsList'
{ _llLanguage :: !(Maybe Text)
, _llPageToken :: !(Maybe Text)
, _llMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
leaderboardsList
:: LeaderboardsList
leaderboardsList =
LeaderboardsList'
{ _llLanguage = Nothing
, _llPageToken = Nothing
, _llMaxResults = Nothing
}
llLanguage :: Lens' LeaderboardsList (Maybe Text)
llLanguage
= lens _llLanguage (\ s a -> s{_llLanguage = a})
llPageToken :: Lens' LeaderboardsList (Maybe Text)
llPageToken
= lens _llPageToken (\ s a -> s{_llPageToken = a})
llMaxResults :: Lens' LeaderboardsList (Maybe Int32)
llMaxResults
= lens _llMaxResults (\ s a -> s{_llMaxResults = a})
. mapping _Coerce
instance GoogleRequest LeaderboardsList where
type Rs LeaderboardsList = LeaderboardListResponse
type Scopes LeaderboardsList =
'["https://www.googleapis.com/auth/games"]
requestClient LeaderboardsList'{..}
= go _llLanguage _llPageToken _llMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy LeaderboardsListResource)
mempty