{-# 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.Comments.List
(
CommentsListResource
, commentsList
, CommentsList
, clStatus
, clEndDate
, clBlogId
, clStartDate
, clFetchBodies
, clView
, clPostId
, clPageToken
, clMaxResults
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type CommentsListResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
"comments" :>
QueryParams "status" CommentsListStatus :>
QueryParam "endDate" DateTime' :>
QueryParam "startDate" DateTime' :>
QueryParam "fetchBodies" Bool :>
QueryParam "view" CommentsListView :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CommentList
data CommentsList = CommentsList'
{ _clStatus :: !(Maybe [CommentsListStatus])
, _clEndDate :: !(Maybe DateTime')
, _clBlogId :: !Text
, _clStartDate :: !(Maybe DateTime')
, _clFetchBodies :: !(Maybe Bool)
, _clView :: !(Maybe CommentsListView)
, _clPostId :: !Text
, _clPageToken :: !(Maybe Text)
, _clMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
commentsList
:: Text
-> Text
-> CommentsList
commentsList pClBlogId_ pClPostId_ =
CommentsList'
{ _clStatus = Nothing
, _clEndDate = Nothing
, _clBlogId = pClBlogId_
, _clStartDate = Nothing
, _clFetchBodies = Nothing
, _clView = Nothing
, _clPostId = pClPostId_
, _clPageToken = Nothing
, _clMaxResults = Nothing
}
clStatus :: Lens' CommentsList [CommentsListStatus]
clStatus
= lens _clStatus (\ s a -> s{_clStatus = a}) .
_Default
. _Coerce
clEndDate :: Lens' CommentsList (Maybe UTCTime)
clEndDate
= lens _clEndDate (\ s a -> s{_clEndDate = a}) .
mapping _DateTime
clBlogId :: Lens' CommentsList Text
clBlogId = lens _clBlogId (\ s a -> s{_clBlogId = a})
clStartDate :: Lens' CommentsList (Maybe UTCTime)
clStartDate
= lens _clStartDate (\ s a -> s{_clStartDate = a}) .
mapping _DateTime
clFetchBodies :: Lens' CommentsList (Maybe Bool)
clFetchBodies
= lens _clFetchBodies
(\ s a -> s{_clFetchBodies = a})
clView :: Lens' CommentsList (Maybe CommentsListView)
clView = lens _clView (\ s a -> s{_clView = a})
clPostId :: Lens' CommentsList Text
clPostId = lens _clPostId (\ s a -> s{_clPostId = a})
clPageToken :: Lens' CommentsList (Maybe Text)
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clMaxResults :: Lens' CommentsList (Maybe Word32)
clMaxResults
= lens _clMaxResults (\ s a -> s{_clMaxResults = a})
. mapping _Coerce
instance GoogleRequest CommentsList where
type Rs CommentsList = CommentList
type Scopes CommentsList =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient CommentsList'{..}
= go _clBlogId _clPostId (_clStatus ^. _Default)
_clEndDate
_clStartDate
_clFetchBodies
_clView
_clPageToken
_clMaxResults
(Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy CommentsListResource)
mempty