{-# 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.Metagame.ListCategoriesByPlayer
(
MetagameListCategoriesByPlayerResource
, metagameListCategoriesByPlayer
, MetagameListCategoriesByPlayer
, mlcbpCollection
, mlcbpLanguage
, mlcbpPageToken
, mlcbpPlayerId
, mlcbpMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type MetagameListCategoriesByPlayerResource =
"games" :>
"v1" :>
"players" :>
Capture "playerId" Text :>
"categories" :>
Capture "collection"
MetagameListCategoriesByPlayerCollection
:>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CategoryListResponse
data MetagameListCategoriesByPlayer = MetagameListCategoriesByPlayer'
{ _mlcbpCollection :: !MetagameListCategoriesByPlayerCollection
, _mlcbpLanguage :: !(Maybe Text)
, _mlcbpPageToken :: !(Maybe Text)
, _mlcbpPlayerId :: !Text
, _mlcbpMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
metagameListCategoriesByPlayer
:: MetagameListCategoriesByPlayerCollection
-> Text
-> MetagameListCategoriesByPlayer
metagameListCategoriesByPlayer pMlcbpCollection_ pMlcbpPlayerId_ =
MetagameListCategoriesByPlayer'
{ _mlcbpCollection = pMlcbpCollection_
, _mlcbpLanguage = Nothing
, _mlcbpPageToken = Nothing
, _mlcbpPlayerId = pMlcbpPlayerId_
, _mlcbpMaxResults = Nothing
}
mlcbpCollection :: Lens' MetagameListCategoriesByPlayer MetagameListCategoriesByPlayerCollection
mlcbpCollection
= lens _mlcbpCollection
(\ s a -> s{_mlcbpCollection = a})
mlcbpLanguage :: Lens' MetagameListCategoriesByPlayer (Maybe Text)
mlcbpLanguage
= lens _mlcbpLanguage
(\ s a -> s{_mlcbpLanguage = a})
mlcbpPageToken :: Lens' MetagameListCategoriesByPlayer (Maybe Text)
mlcbpPageToken
= lens _mlcbpPageToken
(\ s a -> s{_mlcbpPageToken = a})
mlcbpPlayerId :: Lens' MetagameListCategoriesByPlayer Text
mlcbpPlayerId
= lens _mlcbpPlayerId
(\ s a -> s{_mlcbpPlayerId = a})
mlcbpMaxResults :: Lens' MetagameListCategoriesByPlayer (Maybe Int32)
mlcbpMaxResults
= lens _mlcbpMaxResults
(\ s a -> s{_mlcbpMaxResults = a})
. mapping _Coerce
instance GoogleRequest MetagameListCategoriesByPlayer
where
type Rs MetagameListCategoriesByPlayer =
CategoryListResponse
type Scopes MetagameListCategoriesByPlayer =
'["https://www.googleapis.com/auth/games"]
requestClient MetagameListCategoriesByPlayer'{..}
= go _mlcbpPlayerId _mlcbpCollection _mlcbpLanguage
_mlcbpPageToken
_mlcbpMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy ::
Proxy MetagameListCategoriesByPlayerResource)
mempty