{-# 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.List
(
PeopleListResource
, peopleList
, PeopleList
, plOrderBy
, plCollection
, plUserId
, plPageToken
, plMaxResults
) where
import Network.Google.Plus.Types
import Network.Google.Prelude
type PeopleListResource =
"plus" :>
"v1" :>
"people" :>
Capture "userId" Text :>
"people" :>
Capture "collection" PeopleListCollection :>
QueryParam "orderBy" PeopleListOrderBy :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] PeopleFeed
data PeopleList = PeopleList'
{ _plOrderBy :: !(Maybe PeopleListOrderBy)
, _plCollection :: !PeopleListCollection
, _plUserId :: !Text
, _plPageToken :: !(Maybe Text)
, _plMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
peopleList
:: PeopleListCollection
-> Text
-> PeopleList
peopleList pPlCollection_ pPlUserId_ =
PeopleList'
{ _plOrderBy = Nothing
, _plCollection = pPlCollection_
, _plUserId = pPlUserId_
, _plPageToken = Nothing
, _plMaxResults = 100
}
plOrderBy :: Lens' PeopleList (Maybe PeopleListOrderBy)
plOrderBy
= lens _plOrderBy (\ s a -> s{_plOrderBy = a})
plCollection :: Lens' PeopleList PeopleListCollection
plCollection
= lens _plCollection (\ s a -> s{_plCollection = a})
plUserId :: Lens' PeopleList Text
plUserId = lens _plUserId (\ s a -> s{_plUserId = a})
plPageToken :: Lens' PeopleList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plMaxResults :: Lens' PeopleList Word32
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. _Coerce
instance GoogleRequest PeopleList where
type Rs PeopleList = PeopleFeed
type Scopes PeopleList =
'["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient PeopleList'{..}
= go _plUserId _plCollection _plOrderBy _plPageToken
(Just _plMaxResults)
(Just AltJSON)
plusService
where go
= buildClient (Proxy :: Proxy PeopleListResource)
mempty