{-# 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.Plus.People.ListByActivity
(
PeopleListByActivityResource
, peopleListByActivity
, PeopleListByActivity
, plbaActivityId
, plbaCollection
, plbaPageToken
, plbaMaxResults
) where
import Network.Google.Plus.Types
import Network.Google.Prelude
type PeopleListByActivityResource =
"plus" :>
"v1" :>
"activities" :>
Capture "activityId" Text :>
"people" :>
Capture "collection" PeopleListByActivityCollection
:>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] PeopleFeed
data PeopleListByActivity = PeopleListByActivity'
{ _plbaActivityId :: !Text
, _plbaCollection :: !PeopleListByActivityCollection
, _plbaPageToken :: !(Maybe Text)
, _plbaMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
peopleListByActivity
:: Text
-> PeopleListByActivityCollection
-> PeopleListByActivity
peopleListByActivity pPlbaActivityId_ pPlbaCollection_ =
PeopleListByActivity'
{ _plbaActivityId = pPlbaActivityId_
, _plbaCollection = pPlbaCollection_
, _plbaPageToken = Nothing
, _plbaMaxResults = 20
}
plbaActivityId :: Lens' PeopleListByActivity Text
plbaActivityId
= lens _plbaActivityId
(\ s a -> s{_plbaActivityId = a})
plbaCollection :: Lens' PeopleListByActivity PeopleListByActivityCollection
plbaCollection
= lens _plbaCollection
(\ s a -> s{_plbaCollection = a})
plbaPageToken :: Lens' PeopleListByActivity (Maybe Text)
plbaPageToken
= lens _plbaPageToken
(\ s a -> s{_plbaPageToken = a})
plbaMaxResults :: Lens' PeopleListByActivity Word32
plbaMaxResults
= lens _plbaMaxResults
(\ s a -> s{_plbaMaxResults = a})
. _Coerce
instance GoogleRequest PeopleListByActivity where
type Rs PeopleListByActivity = PeopleFeed
type Scopes PeopleListByActivity =
'["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient PeopleListByActivity'{..}
= go _plbaActivityId _plbaCollection _plbaPageToken
(Just _plbaMaxResults)
(Just AltJSON)
plusService
where go
= buildClient
(Proxy :: Proxy PeopleListByActivityResource)
mempty