{-# 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.YouTube.Sponsors.List
(
SponsorsListResource
, sponsorsList
, SponsorsList
, sPart
, sFilter
, sPageToken
, sMaxResults
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type SponsorsListResource =
"youtube" :>
"v3" :>
"sponsors" :>
QueryParam "part" Text :>
QueryParam "filter" SponsorsListFilter :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SponsorListResponse
data SponsorsList = SponsorsList'
{ _sPart :: !Text
, _sFilter :: !SponsorsListFilter
, _sPageToken :: !(Maybe Text)
, _sMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
sponsorsList
:: Text
-> SponsorsList
sponsorsList pSPart_ =
SponsorsList'
{ _sPart = pSPart_
, _sFilter = SLFNewest
, _sPageToken = Nothing
, _sMaxResults = 5
}
sPart :: Lens' SponsorsList Text
sPart = lens _sPart (\ s a -> s{_sPart = a})
sFilter :: Lens' SponsorsList SponsorsListFilter
sFilter = lens _sFilter (\ s a -> s{_sFilter = a})
sPageToken :: Lens' SponsorsList (Maybe Text)
sPageToken
= lens _sPageToken (\ s a -> s{_sPageToken = a})
sMaxResults :: Lens' SponsorsList Word32
sMaxResults
= lens _sMaxResults (\ s a -> s{_sMaxResults = a}) .
_Coerce
instance GoogleRequest SponsorsList where
type Rs SponsorsList = SponsorListResponse
type Scopes SponsorsList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtube.readonly"]
requestClient SponsorsList'{..}
= go (Just _sPart) (Just _sFilter) _sPageToken
(Just _sMaxResults)
(Just AltJSON)
youTubeService
where go
= buildClient (Proxy :: Proxy SponsorsListResource)
mempty