{-# 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.Get
(
CommentsGetResource
, commentsGet
, CommentsGet
, cgBlogId
, cgView
, cgPostId
, cgCommentId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type CommentsGetResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
"comments" :>
Capture "commentId" Text :>
QueryParam "view" CommentsGetView :>
QueryParam "alt" AltJSON :> Get '[JSON] Comment
data CommentsGet = CommentsGet'
{ _cgBlogId :: !Text
, _cgView :: !(Maybe CommentsGetView)
, _cgPostId :: !Text
, _cgCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
commentsGet
:: Text
-> Text
-> Text
-> CommentsGet
commentsGet pCgBlogId_ pCgPostId_ pCgCommentId_ =
CommentsGet'
{ _cgBlogId = pCgBlogId_
, _cgView = Nothing
, _cgPostId = pCgPostId_
, _cgCommentId = pCgCommentId_
}
cgBlogId :: Lens' CommentsGet Text
cgBlogId = lens _cgBlogId (\ s a -> s{_cgBlogId = a})
cgView :: Lens' CommentsGet (Maybe CommentsGetView)
cgView = lens _cgView (\ s a -> s{_cgView = a})
cgPostId :: Lens' CommentsGet Text
cgPostId = lens _cgPostId (\ s a -> s{_cgPostId = a})
cgCommentId :: Lens' CommentsGet Text
cgCommentId
= lens _cgCommentId (\ s a -> s{_cgCommentId = a})
instance GoogleRequest CommentsGet where
type Rs CommentsGet = Comment
type Scopes CommentsGet =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient CommentsGet'{..}
= go _cgBlogId _cgPostId _cgCommentId _cgView
(Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy CommentsGetResource)
mempty