{-# 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
-- | Retrieves information about specific site.
--
-- /See:/ 'sitesGet' smart constructor.
newtype SitesGet = SitesGet'
{ _sitSiteURL :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'SitesGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sitSiteURL'
sitesGet
:: Text -- ^ 'sitSiteURL'
-> SitesGet
sitesGet pSitSiteURL_ =
SitesGet'
{ _sitSiteURL = pSitSiteURL_
}
-- | The URI of the property as defined in Search Console. Examples:
-- http:\/\/www.example.com\/ or android-app:\/\/com.example\/
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