{-# 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.Quests.List
(
QuestsListResource
, questsList
, QuestsList
, qlLanguage
, qlPageToken
, qlPlayerId
, qlMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type QuestsListResource =
"games" :>
"v1" :>
"players" :>
Capture "playerId" Text :>
"quests" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] QuestListResponse
data QuestsList = QuestsList'
{ _qlLanguage :: !(Maybe Text)
, _qlPageToken :: !(Maybe Text)
, _qlPlayerId :: !Text
, _qlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
questsList
:: Text
-> QuestsList
questsList pQlPlayerId_ =
QuestsList'
{ _qlLanguage = Nothing
, _qlPageToken = Nothing
, _qlPlayerId = pQlPlayerId_
, _qlMaxResults = Nothing
}
qlLanguage :: Lens' QuestsList (Maybe Text)
qlLanguage
= lens _qlLanguage (\ s a -> s{_qlLanguage = a})
qlPageToken :: Lens' QuestsList (Maybe Text)
qlPageToken
= lens _qlPageToken (\ s a -> s{_qlPageToken = a})
qlPlayerId :: Lens' QuestsList Text
qlPlayerId
= lens _qlPlayerId (\ s a -> s{_qlPlayerId = a})
qlMaxResults :: Lens' QuestsList (Maybe Int32)
qlMaxResults
= lens _qlMaxResults (\ s a -> s{_qlMaxResults = a})
. mapping _Coerce
instance GoogleRequest QuestsList where
type Rs QuestsList = QuestListResponse
type Scopes QuestsList =
'["https://www.googleapis.com/auth/games"]
requestClient QuestsList'{..}
= go _qlPlayerId _qlLanguage _qlPageToken
_qlMaxResults
(Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy QuestsListResource)
mempty