{-# 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.Audiences.List
(
AudiencesListResource
, audiencesList
, AudiencesList
, aUserId
, aPageToken
, aMaxResults
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type AudiencesListResource =
"plusDomains" :>
"v1" :>
"people" :>
Capture "userId" Text :>
"audiences" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AudiencesFeed
data AudiencesList = AudiencesList'
{ _aUserId :: !Text
, _aPageToken :: !(Maybe Text)
, _aMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
audiencesList
:: Text
-> AudiencesList
audiencesList pAUserId_ =
AudiencesList'
{ _aUserId = pAUserId_
, _aPageToken = Nothing
, _aMaxResults = 20
}
aUserId :: Lens' AudiencesList Text
aUserId = lens _aUserId (\ s a -> s{_aUserId = a})
aPageToken :: Lens' AudiencesList (Maybe Text)
aPageToken
= lens _aPageToken (\ s a -> s{_aPageToken = a})
aMaxResults :: Lens' AudiencesList Word32
aMaxResults
= lens _aMaxResults (\ s a -> s{_aMaxResults = a}) .
_Coerce
instance GoogleRequest AudiencesList where
type Rs AudiencesList = AudiencesFeed
type Scopes AudiencesList =
'["https://www.googleapis.com/auth/plus.circles.read",
"https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient AudiencesList'{..}
= go _aUserId _aPageToken (Just _aMaxResults)
(Just AltJSON)
plusDomainsService
where go
= buildClient (Proxy :: Proxy AudiencesListResource)
mempty