{-# 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.Snapshots.List
(
SnapshotsListResource
, snapshotsList
, SnapshotsList
, slLanguage
, slPageToken
, slPlayerId
, slMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type SnapshotsListResource =
"games" :>
"v1" :>
"players" :>
Capture "playerId" Text :>
"snapshots" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SnapshotListResponse
data SnapshotsList = SnapshotsList'
{ _slLanguage :: !(Maybe Text)
, _slPageToken :: !(Maybe Text)
, _slPlayerId :: !Text
, _slMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
snapshotsList
:: Text
-> SnapshotsList
snapshotsList pSlPlayerId_ =
SnapshotsList'
{ _slLanguage = Nothing
, _slPageToken = Nothing
, _slPlayerId = pSlPlayerId_
, _slMaxResults = Nothing
}
slLanguage :: Lens' SnapshotsList (Maybe Text)
slLanguage
= lens _slLanguage (\ s a -> s{_slLanguage = a})
slPageToken :: Lens' SnapshotsList (Maybe Text)
slPageToken
= lens _slPageToken (\ s a -> s{_slPageToken = a})
slPlayerId :: Lens' SnapshotsList Text
slPlayerId
= lens _slPlayerId (\ s a -> s{_slPlayerId = a})
slMaxResults :: Lens' SnapshotsList (Maybe Int32)
slMaxResults
= lens _slMaxResults (\ s a -> s{_slMaxResults = a})
. mapping _Coerce
instance GoogleRequest SnapshotsList where
type Rs SnapshotsList = SnapshotListResponse
type Scopes SnapshotsList =
'["https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/games"]
requestClient SnapshotsList'{..}
= go _slPlayerId _slLanguage _slPageToken
_slMaxResults
(Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy SnapshotsListResource)
mempty