{-# 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.Achievements.List
(
AchievementsListResource
, achievementsList
, AchievementsList
, alState
, alLanguage
, alPageToken
, alPlayerId
, alMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type AchievementsListResource =
"games" :>
"v1" :>
"players" :>
Capture "playerId" Text :>
"achievements" :>
QueryParam "state" AchievementsListState :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlayerAchievementListResponse
data AchievementsList = AchievementsList'
{ _alState :: !(Maybe AchievementsListState)
, _alLanguage :: !(Maybe Text)
, _alPageToken :: !(Maybe Text)
, _alPlayerId :: !Text
, _alMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
achievementsList
:: Text
-> AchievementsList
achievementsList pAlPlayerId_ =
AchievementsList'
{ _alState = Nothing
, _alLanguage = Nothing
, _alPageToken = Nothing
, _alPlayerId = pAlPlayerId_
, _alMaxResults = Nothing
}
alState :: Lens' AchievementsList (Maybe AchievementsListState)
alState = lens _alState (\ s a -> s{_alState = a})
alLanguage :: Lens' AchievementsList (Maybe Text)
alLanguage
= lens _alLanguage (\ s a -> s{_alLanguage = a})
alPageToken :: Lens' AchievementsList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alPlayerId :: Lens' AchievementsList Text
alPlayerId
= lens _alPlayerId (\ s a -> s{_alPlayerId = a})
alMaxResults :: Lens' AchievementsList (Maybe Int32)
alMaxResults
= lens _alMaxResults (\ s a -> s{_alMaxResults = a})
. mapping _Coerce
instance GoogleRequest AchievementsList where
type Rs AchievementsList =
PlayerAchievementListResponse
type Scopes AchievementsList =
'["https://www.googleapis.com/auth/games"]
requestClient AchievementsList'{..}
= go _alPlayerId _alState _alLanguage _alPageToken
_alMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy AchievementsListResource)
mempty