{-# 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.Events.ListByPlayer
(
EventsListByPlayerResource
, eventsListByPlayer
, EventsListByPlayer
, elbpLanguage
, elbpPageToken
, elbpMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type EventsListByPlayerResource =
"games" :>
"v1" :>
"events" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PlayerEventListResponse
data EventsListByPlayer = EventsListByPlayer'
{ _elbpLanguage :: !(Maybe Text)
, _elbpPageToken :: !(Maybe Text)
, _elbpMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
eventsListByPlayer
:: EventsListByPlayer
eventsListByPlayer =
EventsListByPlayer'
{ _elbpLanguage = Nothing
, _elbpPageToken = Nothing
, _elbpMaxResults = Nothing
}
elbpLanguage :: Lens' EventsListByPlayer (Maybe Text)
elbpLanguage
= lens _elbpLanguage (\ s a -> s{_elbpLanguage = a})
elbpPageToken :: Lens' EventsListByPlayer (Maybe Text)
elbpPageToken
= lens _elbpPageToken
(\ s a -> s{_elbpPageToken = a})
elbpMaxResults :: Lens' EventsListByPlayer (Maybe Int32)
elbpMaxResults
= lens _elbpMaxResults
(\ s a -> s{_elbpMaxResults = a})
. mapping _Coerce
instance GoogleRequest EventsListByPlayer where
type Rs EventsListByPlayer = PlayerEventListResponse
type Scopes EventsListByPlayer =
'["https://www.googleapis.com/auth/games"]
requestClient EventsListByPlayer'{..}
= go _elbpLanguage _elbpPageToken _elbpMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy EventsListByPlayerResource)
mempty