module Network.Google.Resource.Games.TurnBasedMatches.Get
(
TurnBasedMatchesGetResource
, turnBasedMatchesGet
, TurnBasedMatchesGet
, tbmgConsistencyToken
, tbmgIncludeMatchData
, tbmgLanguage
, tbmgMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesGetResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
QueryParam "consistencyToken" (Textual Int64) :>
QueryParam "includeMatchData" Bool :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] TurnBasedMatch
data TurnBasedMatchesGet = TurnBasedMatchesGet'
{ _tbmgConsistencyToken :: !(Maybe (Textual Int64))
, _tbmgIncludeMatchData :: !(Maybe Bool)
, _tbmgLanguage :: !(Maybe Text)
, _tbmgMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesGet
:: Text
-> TurnBasedMatchesGet
turnBasedMatchesGet pTbmgMatchId_ =
TurnBasedMatchesGet'
{ _tbmgConsistencyToken = Nothing
, _tbmgIncludeMatchData = Nothing
, _tbmgLanguage = Nothing
, _tbmgMatchId = pTbmgMatchId_
}
tbmgConsistencyToken :: Lens' TurnBasedMatchesGet (Maybe Int64)
tbmgConsistencyToken
= lens _tbmgConsistencyToken
(\ s a -> s{_tbmgConsistencyToken = a})
. mapping _Coerce
tbmgIncludeMatchData :: Lens' TurnBasedMatchesGet (Maybe Bool)
tbmgIncludeMatchData
= lens _tbmgIncludeMatchData
(\ s a -> s{_tbmgIncludeMatchData = a})
tbmgLanguage :: Lens' TurnBasedMatchesGet (Maybe Text)
tbmgLanguage
= lens _tbmgLanguage (\ s a -> s{_tbmgLanguage = a})
tbmgMatchId :: Lens' TurnBasedMatchesGet Text
tbmgMatchId
= lens _tbmgMatchId (\ s a -> s{_tbmgMatchId = a})
instance GoogleRequest TurnBasedMatchesGet where
type Rs TurnBasedMatchesGet = TurnBasedMatch
type Scopes TurnBasedMatchesGet =
'["https://www.googleapis.com/auth/games",
"https://www.googleapis.com/auth/plus.login"]
requestClient TurnBasedMatchesGet'{..}
= go _tbmgMatchId _tbmgConsistencyToken
_tbmgIncludeMatchData
_tbmgLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesGetResource)
mempty