{-# 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.BlogUserInfos.Get
(
BlogUserInfosGetResource
, blogUserInfosGet
, BlogUserInfosGet
, buigBlogId
, buigUserId
, buigMaxPosts
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type BlogUserInfosGetResource =
"blogger" :>
"v3" :>
"users" :>
Capture "userId" Text :>
"blogs" :>
Capture "blogId" Text :>
QueryParam "maxPosts" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] BlogUserInfo
data BlogUserInfosGet = BlogUserInfosGet'
{ _buigBlogId :: !Text
, _buigUserId :: !Text
, _buigMaxPosts :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
blogUserInfosGet
:: Text
-> Text
-> BlogUserInfosGet
blogUserInfosGet pBuigBlogId_ pBuigUserId_ =
BlogUserInfosGet'
{ _buigBlogId = pBuigBlogId_
, _buigUserId = pBuigUserId_
, _buigMaxPosts = Nothing
}
buigBlogId :: Lens' BlogUserInfosGet Text
buigBlogId
= lens _buigBlogId (\ s a -> s{_buigBlogId = a})
buigUserId :: Lens' BlogUserInfosGet Text
buigUserId
= lens _buigUserId (\ s a -> s{_buigUserId = a})
buigMaxPosts :: Lens' BlogUserInfosGet (Maybe Word32)
buigMaxPosts
= lens _buigMaxPosts (\ s a -> s{_buigMaxPosts = a})
. mapping _Coerce
instance GoogleRequest BlogUserInfosGet where
type Rs BlogUserInfosGet = BlogUserInfo
type Scopes BlogUserInfosGet =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient BlogUserInfosGet'{..}
= go _buigUserId _buigBlogId _buigMaxPosts
(Just AltJSON)
bloggerService
where go
= buildClient
(Proxy :: Proxy BlogUserInfosGetResource)
mempty