{-# 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.Scores.List
(
ScoresListResource
, scoresList
, ScoresList
, sllCollection
, sllTimeSpan
, sllLeaderboardId
, sllLanguage
, sllPageToken
, sllMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type ScoresListResource =
"games" :>
"v1" :>
"leaderboards" :>
Capture "leaderboardId" Text :>
"scores" :>
Capture "collection" ScoresListCollection :>
QueryParam "timeSpan" ScoresListTimeSpan :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LeaderboardScores
data ScoresList = ScoresList'
{ _sllCollection :: !ScoresListCollection
, _sllTimeSpan :: !ScoresListTimeSpan
, _sllLeaderboardId :: !Text
, _sllLanguage :: !(Maybe Text)
, _sllPageToken :: !(Maybe Text)
, _sllMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
scoresList
:: ScoresListCollection
-> ScoresListTimeSpan
-> Text
-> ScoresList
scoresList pSllCollection_ pSllTimeSpan_ pSllLeaderboardId_ =
ScoresList'
{ _sllCollection = pSllCollection_
, _sllTimeSpan = pSllTimeSpan_
, _sllLeaderboardId = pSllLeaderboardId_
, _sllLanguage = Nothing
, _sllPageToken = Nothing
, _sllMaxResults = Nothing
}
sllCollection :: Lens' ScoresList ScoresListCollection
sllCollection
= lens _sllCollection
(\ s a -> s{_sllCollection = a})
sllTimeSpan :: Lens' ScoresList ScoresListTimeSpan
sllTimeSpan
= lens _sllTimeSpan (\ s a -> s{_sllTimeSpan = a})
sllLeaderboardId :: Lens' ScoresList Text
sllLeaderboardId
= lens _sllLeaderboardId
(\ s a -> s{_sllLeaderboardId = a})
sllLanguage :: Lens' ScoresList (Maybe Text)
sllLanguage
= lens _sllLanguage (\ s a -> s{_sllLanguage = a})
sllPageToken :: Lens' ScoresList (Maybe Text)
sllPageToken
= lens _sllPageToken (\ s a -> s{_sllPageToken = a})
sllMaxResults :: Lens' ScoresList (Maybe Int32)
sllMaxResults
= lens _sllMaxResults
(\ s a -> s{_sllMaxResults = a})
. mapping _Coerce
instance GoogleRequest ScoresList where
type Rs ScoresList = LeaderboardScores
type Scopes ScoresList =
'["https://www.googleapis.com/auth/games"]
requestClient ScoresList'{..}
= go _sllLeaderboardId _sllCollection
(Just _sllTimeSpan)
_sllLanguage
_sllPageToken
_sllMaxResults
(Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy ScoresListResource)
mempty