{-# 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.Approve
(
CommentsApproveResource
, commentsApprove
, CommentsApprove
, caBlogId
, caPostId
, caCommentId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type CommentsApproveResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
"comments" :>
Capture "commentId" Text :>
"approve" :>
QueryParam "alt" AltJSON :> Post '[JSON] Comment
data CommentsApprove = CommentsApprove'
{ _caBlogId :: !Text
, _caPostId :: !Text
, _caCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
commentsApprove
:: Text
-> Text
-> Text
-> CommentsApprove
commentsApprove pCaBlogId_ pCaPostId_ pCaCommentId_ =
CommentsApprove'
{ _caBlogId = pCaBlogId_
, _caPostId = pCaPostId_
, _caCommentId = pCaCommentId_
}
caBlogId :: Lens' CommentsApprove Text
caBlogId = lens _caBlogId (\ s a -> s{_caBlogId = a})
caPostId :: Lens' CommentsApprove Text
caPostId = lens _caPostId (\ s a -> s{_caPostId = a})
caCommentId :: Lens' CommentsApprove Text
caCommentId
= lens _caCommentId (\ s a -> s{_caCommentId = a})
instance GoogleRequest CommentsApprove where
type Rs CommentsApprove = Comment
type Scopes CommentsApprove =
'["https://www.googleapis.com/auth/blogger"]
requestClient CommentsApprove'{..}
= go _caBlogId _caPostId _caCommentId (Just AltJSON)
bloggerService
where go
= buildClient
(Proxy :: Proxy CommentsApproveResource)
mempty