{-# 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.Players.List
(
PlayersListResource
, playersList
, PlayersList
, plCollection
, plLanguage
, plPageToken
, plMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type PlayersListResource =
"games" :>
"v1" :>
"players" :>
"me" :>
"players" :>
Capture "collection" PlayersListCollection :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlayerListResponse
data PlayersList = PlayersList'
{ _plCollection :: !PlayersListCollection
, _plLanguage :: !(Maybe Text)
, _plPageToken :: !(Maybe Text)
, _plMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
playersList
:: PlayersListCollection
-> PlayersList
playersList pPlCollection_ =
PlayersList'
{ _plCollection = pPlCollection_
, _plLanguage = Nothing
, _plPageToken = Nothing
, _plMaxResults = Nothing
}
plCollection :: Lens' PlayersList PlayersListCollection
plCollection
= lens _plCollection (\ s a -> s{_plCollection = a})
plLanguage :: Lens' PlayersList (Maybe Text)
plLanguage
= lens _plLanguage (\ s a -> s{_plLanguage = a})
plPageToken :: Lens' PlayersList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plMaxResults :: Lens' PlayersList (Maybe Int32)
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. mapping _Coerce
instance GoogleRequest PlayersList where
type Rs PlayersList = PlayerListResponse
type Scopes PlayersList =
'["https://www.googleapis.com/auth/games"]
requestClient PlayersList'{..}
= go _plCollection _plLanguage _plPageToken
_plMaxResults
(Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy PlayersListResource)
mempty