{-# 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.Blogs.GetByURL
(
BlogsGetByURLResource
, blogsGetByURL
, BlogsGetByURL
, bgbuURL
, bgbuView
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type BlogsGetByURLResource =
"blogger" :>
"v3" :>
"blogs" :>
"byurl" :>
QueryParam "url" Text :>
QueryParam "view" BlogsGetByURLView :>
QueryParam "alt" AltJSON :> Get '[JSON] Blog
data BlogsGetByURL = BlogsGetByURL'
{ _bgbuURL :: !Text
, _bgbuView :: !(Maybe BlogsGetByURLView)
} deriving (Eq,Show,Data,Typeable,Generic)
blogsGetByURL
:: Text
-> BlogsGetByURL
blogsGetByURL pBgbuURL_ =
BlogsGetByURL'
{ _bgbuURL = pBgbuURL_
, _bgbuView = Nothing
}
bgbuURL :: Lens' BlogsGetByURL Text
bgbuURL = lens _bgbuURL (\ s a -> s{_bgbuURL = a})
bgbuView :: Lens' BlogsGetByURL (Maybe BlogsGetByURLView)
bgbuView = lens _bgbuView (\ s a -> s{_bgbuView = a})
instance GoogleRequest BlogsGetByURL where
type Rs BlogsGetByURL = Blog
type Scopes BlogsGetByURL =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient BlogsGetByURL'{..}
= go (Just _bgbuURL) _bgbuView (Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy BlogsGetByURLResource)
mempty