{-# 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.ListWindow
(
ScoresListWindowResource
, scoresListWindow
, ScoresListWindow
, slwCollection
, slwTimeSpan
, slwReturnTopIfAbsent
, slwLeaderboardId
, slwLanguage
, slwResultsAbove
, slwPageToken
, slwMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type ScoresListWindowResource =
"games" :>
"v1" :>
"leaderboards" :>
Capture "leaderboardId" Text :>
"window" :>
Capture "collection" ScoresListWindowCollection :>
QueryParam "timeSpan" ScoresListWindowTimeSpan :>
QueryParam "returnTopIfAbsent" Bool :>
QueryParam "language" Text :>
QueryParam "resultsAbove" (Textual Int32) :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LeaderboardScores
data ScoresListWindow = ScoresListWindow'
{ _slwCollection :: !ScoresListWindowCollection
, _slwTimeSpan :: !ScoresListWindowTimeSpan
, _slwReturnTopIfAbsent :: !(Maybe Bool)
, _slwLeaderboardId :: !Text
, _slwLanguage :: !(Maybe Text)
, _slwResultsAbove :: !(Maybe (Textual Int32))
, _slwPageToken :: !(Maybe Text)
, _slwMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
scoresListWindow
:: ScoresListWindowCollection
-> ScoresListWindowTimeSpan
-> Text
-> ScoresListWindow
scoresListWindow pSlwCollection_ pSlwTimeSpan_ pSlwLeaderboardId_ =
ScoresListWindow'
{ _slwCollection = pSlwCollection_
, _slwTimeSpan = pSlwTimeSpan_
, _slwReturnTopIfAbsent = Nothing
, _slwLeaderboardId = pSlwLeaderboardId_
, _slwLanguage = Nothing
, _slwResultsAbove = Nothing
, _slwPageToken = Nothing
, _slwMaxResults = Nothing
}
slwCollection :: Lens' ScoresListWindow ScoresListWindowCollection
slwCollection
= lens _slwCollection
(\ s a -> s{_slwCollection = a})
slwTimeSpan :: Lens' ScoresListWindow ScoresListWindowTimeSpan
slwTimeSpan
= lens _slwTimeSpan (\ s a -> s{_slwTimeSpan = a})
slwReturnTopIfAbsent :: Lens' ScoresListWindow (Maybe Bool)
slwReturnTopIfAbsent
= lens _slwReturnTopIfAbsent
(\ s a -> s{_slwReturnTopIfAbsent = a})
slwLeaderboardId :: Lens' ScoresListWindow Text
slwLeaderboardId
= lens _slwLeaderboardId
(\ s a -> s{_slwLeaderboardId = a})
slwLanguage :: Lens' ScoresListWindow (Maybe Text)
slwLanguage
= lens _slwLanguage (\ s a -> s{_slwLanguage = a})
slwResultsAbove :: Lens' ScoresListWindow (Maybe Int32)
slwResultsAbove
= lens _slwResultsAbove
(\ s a -> s{_slwResultsAbove = a})
. mapping _Coerce
slwPageToken :: Lens' ScoresListWindow (Maybe Text)
slwPageToken
= lens _slwPageToken (\ s a -> s{_slwPageToken = a})
slwMaxResults :: Lens' ScoresListWindow (Maybe Int32)
slwMaxResults
= lens _slwMaxResults
(\ s a -> s{_slwMaxResults = a})
. mapping _Coerce
instance GoogleRequest ScoresListWindow where
type Rs ScoresListWindow = LeaderboardScores
type Scopes ScoresListWindow =
'["https://www.googleapis.com/auth/games"]
requestClient ScoresListWindow'{..}
= go _slwLeaderboardId _slwCollection
(Just _slwTimeSpan)
_slwReturnTopIfAbsent
_slwLanguage
_slwResultsAbove
_slwPageToken
_slwMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy ScoresListWindowResource)
mempty