{-# 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.Blogger.PostUserInfos.List
(
PostUserInfosListResource
, postUserInfosList'
, PostUserInfosList'
, puilStatus
, puilOrderBy
, puilEndDate
, puilBlogId
, puilUserId
, puilStartDate
, puilFetchBodies
, puilView
, puilLabels
, puilPageToken
, puilMaxResults
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PostUserInfosListResource =
"blogger" :>
"v3" :>
"users" :>
Capture "userId" Text :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
QueryParams "status" PostUserInfosListStatus :>
QueryParam "orderBy" PostUserInfosListOrderBy :>
QueryParam "endDate" DateTime' :>
QueryParam "startDate" DateTime' :>
QueryParam "fetchBodies" Bool :>
QueryParam "view" PostUserInfosListView :>
QueryParam "labels" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PostUserInfosList
data PostUserInfosList' = PostUserInfosList''
{ _puilStatus :: !(Maybe [PostUserInfosListStatus])
, _puilOrderBy :: !PostUserInfosListOrderBy
, _puilEndDate :: !(Maybe DateTime')
, _puilBlogId :: !Text
, _puilUserId :: !Text
, _puilStartDate :: !(Maybe DateTime')
, _puilFetchBodies :: !Bool
, _puilView :: !(Maybe PostUserInfosListView)
, _puilLabels :: !(Maybe Text)
, _puilPageToken :: !(Maybe Text)
, _puilMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
postUserInfosList'
:: Text
-> Text
-> PostUserInfosList'
postUserInfosList' pPuilBlogId_ pPuilUserId_ =
PostUserInfosList''
{ _puilStatus = Nothing
, _puilOrderBy = PUILOBPublished
, _puilEndDate = Nothing
, _puilBlogId = pPuilBlogId_
, _puilUserId = pPuilUserId_
, _puilStartDate = Nothing
, _puilFetchBodies = False
, _puilView = Nothing
, _puilLabels = Nothing
, _puilPageToken = Nothing
, _puilMaxResults = Nothing
}
puilStatus :: Lens' PostUserInfosList' [PostUserInfosListStatus]
puilStatus
= lens _puilStatus (\ s a -> s{_puilStatus = a}) .
_Default
. _Coerce
puilOrderBy :: Lens' PostUserInfosList' PostUserInfosListOrderBy
puilOrderBy
= lens _puilOrderBy (\ s a -> s{_puilOrderBy = a})
puilEndDate :: Lens' PostUserInfosList' (Maybe UTCTime)
puilEndDate
= lens _puilEndDate (\ s a -> s{_puilEndDate = a}) .
mapping _DateTime
puilBlogId :: Lens' PostUserInfosList' Text
puilBlogId
= lens _puilBlogId (\ s a -> s{_puilBlogId = a})
puilUserId :: Lens' PostUserInfosList' Text
puilUserId
= lens _puilUserId (\ s a -> s{_puilUserId = a})
puilStartDate :: Lens' PostUserInfosList' (Maybe UTCTime)
puilStartDate
= lens _puilStartDate
(\ s a -> s{_puilStartDate = a})
. mapping _DateTime
puilFetchBodies :: Lens' PostUserInfosList' Bool
puilFetchBodies
= lens _puilFetchBodies
(\ s a -> s{_puilFetchBodies = a})
puilView :: Lens' PostUserInfosList' (Maybe PostUserInfosListView)
puilView = lens _puilView (\ s a -> s{_puilView = a})
puilLabels :: Lens' PostUserInfosList' (Maybe Text)
puilLabels
= lens _puilLabels (\ s a -> s{_puilLabels = a})
puilPageToken :: Lens' PostUserInfosList' (Maybe Text)
puilPageToken
= lens _puilPageToken
(\ s a -> s{_puilPageToken = a})
puilMaxResults :: Lens' PostUserInfosList' (Maybe Word32)
puilMaxResults
= lens _puilMaxResults
(\ s a -> s{_puilMaxResults = a})
. mapping _Coerce
instance GoogleRequest PostUserInfosList' where
type Rs PostUserInfosList' = PostUserInfosList
type Scopes PostUserInfosList' =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient PostUserInfosList''{..}
= go _puilUserId _puilBlogId
(_puilStatus ^. _Default)
(Just _puilOrderBy)
_puilEndDate
_puilStartDate
(Just _puilFetchBodies)
_puilView
_puilLabels
_puilPageToken
_puilMaxResults
(Just AltJSON)
bloggerService
where go
= buildClient
(Proxy :: Proxy PostUserInfosListResource)
mempty