{-# 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.Activities.List
(
ActivitiesListResource
, activitiesList
, ActivitiesList
, alCollection
, alUserId
, alPageToken
, alMaxResults
) where
import Network.Google.Plus.Types
import Network.Google.Prelude
type ActivitiesListResource =
"plus" :>
"v1" :>
"people" :>
Capture "userId" Text :>
"activities" :>
Capture "collection" ActivitiesListCollection :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] ActivityFeed
data ActivitiesList = ActivitiesList'
{ _alCollection :: !ActivitiesListCollection
, _alUserId :: !Text
, _alPageToken :: !(Maybe Text)
, _alMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
activitiesList
:: ActivitiesListCollection
-> Text
-> ActivitiesList
activitiesList pAlCollection_ pAlUserId_ =
ActivitiesList'
{ _alCollection = pAlCollection_
, _alUserId = pAlUserId_
, _alPageToken = Nothing
, _alMaxResults = 20
}
alCollection :: Lens' ActivitiesList ActivitiesListCollection
alCollection
= lens _alCollection (\ s a -> s{_alCollection = a})
alUserId :: Lens' ActivitiesList Text
alUserId = lens _alUserId (\ s a -> s{_alUserId = a})
alPageToken :: Lens' ActivitiesList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alMaxResults :: Lens' ActivitiesList Word32
alMaxResults
= lens _alMaxResults (\ s a -> s{_alMaxResults = a})
. _Coerce
instance GoogleRequest ActivitiesList where
type Rs ActivitiesList = ActivityFeed
type Scopes ActivitiesList =
'["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient ActivitiesList'{..}
= go _alUserId _alCollection _alPageToken
(Just _alMaxResults)
(Just AltJSON)
plusService
where go
= buildClient (Proxy :: Proxy ActivitiesListResource)
mempty