{-# 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.Get
(
PostUserInfosGetResource
, postUserInfosGet
, PostUserInfosGet
, puigBlogId
, puigMaxComments
, puigUserId
, puigPostId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PostUserInfosGetResource =
"blogger" :>
"v3" :>
"users" :>
Capture "userId" Text :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
QueryParam "maxComments" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] PostUserInfo
data PostUserInfosGet = PostUserInfosGet'
{ _puigBlogId :: !Text
, _puigMaxComments :: !(Maybe (Textual Word32))
, _puigUserId :: !Text
, _puigPostId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
postUserInfosGet
:: Text
-> Text
-> Text
-> PostUserInfosGet
postUserInfosGet pPuigBlogId_ pPuigUserId_ pPuigPostId_ =
PostUserInfosGet'
{ _puigBlogId = pPuigBlogId_
, _puigMaxComments = Nothing
, _puigUserId = pPuigUserId_
, _puigPostId = pPuigPostId_
}
puigBlogId :: Lens' PostUserInfosGet Text
puigBlogId
= lens _puigBlogId (\ s a -> s{_puigBlogId = a})
puigMaxComments :: Lens' PostUserInfosGet (Maybe Word32)
puigMaxComments
= lens _puigMaxComments
(\ s a -> s{_puigMaxComments = a})
. mapping _Coerce
puigUserId :: Lens' PostUserInfosGet Text
puigUserId
= lens _puigUserId (\ s a -> s{_puigUserId = a})
puigPostId :: Lens' PostUserInfosGet Text
puigPostId
= lens _puigPostId (\ s a -> s{_puigPostId = a})
instance GoogleRequest PostUserInfosGet where
type Rs PostUserInfosGet = PostUserInfo
type Scopes PostUserInfosGet =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient PostUserInfosGet'{..}
= go _puigUserId _puigBlogId _puigPostId
_puigMaxComments
(Just AltJSON)
bloggerService
where go
= buildClient
(Proxy :: Proxy PostUserInfosGetResource)
mempty