{-# 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.Pages.Get
(
PagesGetResource
, pagesGet
, PagesGet
, pgBlogId
, pgPageId
, pgView
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PagesGetResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"pages" :>
Capture "pageId" Text :>
QueryParam "view" PagesGetView :>
QueryParam "alt" AltJSON :> Get '[JSON] Page
data PagesGet = PagesGet'
{ _pgBlogId :: !Text
, _pgPageId :: !Text
, _pgView :: !(Maybe PagesGetView)
} deriving (Eq,Show,Data,Typeable,Generic)
pagesGet
:: Text
-> Text
-> PagesGet
pagesGet pPgBlogId_ pPgPageId_ =
PagesGet'
{ _pgBlogId = pPgBlogId_
, _pgPageId = pPgPageId_
, _pgView = Nothing
}
pgBlogId :: Lens' PagesGet Text
pgBlogId = lens _pgBlogId (\ s a -> s{_pgBlogId = a})
pgPageId :: Lens' PagesGet Text
pgPageId = lens _pgPageId (\ s a -> s{_pgPageId = a})
pgView :: Lens' PagesGet (Maybe PagesGetView)
pgView = lens _pgView (\ s a -> s{_pgView = a})
instance GoogleRequest PagesGet where
type Rs PagesGet = Page
type Scopes PagesGet =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient PagesGet'{..}
= go _pgBlogId _pgPageId _pgView (Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy PagesGetResource)
mempty