{-# 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.Webmasters.Sites.Get
(
SitesGetResource
, sitesGet
, SitesGet
, sitSiteURL
) where
import Network.Google.Prelude
import Network.Google.WebmasterTools.Types
type SitesGetResource =
"webmasters" :>
"v3" :>
"sites" :>
Capture "siteUrl" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] WmxSite
newtype SitesGet = SitesGet'
{ _sitSiteURL :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
sitesGet
:: Text
-> SitesGet
sitesGet pSitSiteURL_ =
SitesGet'
{ _sitSiteURL = pSitSiteURL_
}
sitSiteURL :: Lens' SitesGet Text
sitSiteURL
= lens _sitSiteURL (\ s a -> s{_sitSiteURL = a})
instance GoogleRequest SitesGet where
type Rs SitesGet = WmxSite
type Scopes SitesGet =
'["https://www.googleapis.com/auth/webmasters",
"https://www.googleapis.com/auth/webmasters.readonly"]
requestClient SitesGet'{..}
= go _sitSiteURL (Just AltJSON) webmasterToolsService
where go
= buildClient (Proxy :: Proxy SitesGetResource)
mempty