{-# 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.Publish
(
PagesPublishResource
, pagesPublish
, PagesPublish
, pagaBlogId
, pagaPageId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PagesPublishResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"pages" :>
Capture "pageId" Text :>
"publish" :>
QueryParam "alt" AltJSON :> Post '[JSON] Page
data PagesPublish = PagesPublish'
{ _pagaBlogId :: !Text
, _pagaPageId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
pagesPublish
:: Text
-> Text
-> PagesPublish
pagesPublish pPagaBlogId_ pPagaPageId_ =
PagesPublish'
{ _pagaBlogId = pPagaBlogId_
, _pagaPageId = pPagaPageId_
}
pagaBlogId :: Lens' PagesPublish Text
pagaBlogId
= lens _pagaBlogId (\ s a -> s{_pagaBlogId = a})
pagaPageId :: Lens' PagesPublish Text
pagaPageId
= lens _pagaPageId (\ s a -> s{_pagaPageId = a})
instance GoogleRequest PagesPublish where
type Rs PagesPublish = Page
type Scopes PagesPublish =
'["https://www.googleapis.com/auth/blogger"]
requestClient PagesPublish'{..}
= go _pagaBlogId _pagaPageId (Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy PagesPublishResource)
mempty