{-# 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.PlusDomains.Circles.List
(
CirclesListResource
, circlesList
, CirclesList
, cUserId
, cPageToken
, cMaxResults
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesListResource =
"plusDomains" :>
"v1" :>
"people" :>
Capture "userId" Text :>
"circles" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] CircleFeed
data CirclesList = CirclesList'
{ _cUserId :: !Text
, _cPageToken :: !(Maybe Text)
, _cMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
circlesList
:: Text
-> CirclesList
circlesList pCUserId_ =
CirclesList'
{ _cUserId = pCUserId_
, _cPageToken = Nothing
, _cMaxResults = 20
}
cUserId :: Lens' CirclesList Text
cUserId = lens _cUserId (\ s a -> s{_cUserId = a})
cPageToken :: Lens' CirclesList (Maybe Text)
cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a})
cMaxResults :: Lens' CirclesList Word32
cMaxResults
= lens _cMaxResults (\ s a -> s{_cMaxResults = a}) .
_Coerce
instance GoogleRequest CirclesList where
type Rs CirclesList = CircleFeed
type Scopes CirclesList =
'["https://www.googleapis.com/auth/plus.circles.read",
"https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient CirclesList'{..}
= go _cUserId _cPageToken (Just _cMaxResults)
(Just AltJSON)
plusDomainsService
where go
= buildClient (Proxy :: Proxy CirclesListResource)
mempty