{-# 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.Get
(
PlayersGetResource
, playersGet
, PlayersGet
, pgLanguage
, pgPlayerId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type PlayersGetResource =
"games" :>
"v1" :>
"players" :>
Capture "playerId" Text :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Player
data PlayersGet = PlayersGet'
{ _pgLanguage :: !(Maybe Text)
, _pgPlayerId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
playersGet
:: Text
-> PlayersGet
playersGet pPgPlayerId_ =
PlayersGet'
{ _pgLanguage = Nothing
, _pgPlayerId = pPgPlayerId_
}
pgLanguage :: Lens' PlayersGet (Maybe Text)
pgLanguage
= lens _pgLanguage (\ s a -> s{_pgLanguage = a})
pgPlayerId :: Lens' PlayersGet Text
pgPlayerId
= lens _pgPlayerId (\ s a -> s{_pgPlayerId = a})
instance GoogleRequest PlayersGet where
type Rs PlayersGet = Player
type Scopes PlayersGet =
'["https://www.googleapis.com/auth/games"]
requestClient PlayersGet'{..}
= go _pgPlayerId _pgLanguage (Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy PlayersGetResource)
mempty