{-# 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.GuideCategories.List
(
GuideCategoriesListResource
, guideCategoriesList
, GuideCategoriesList
, gclPart
, gclRegionCode
, gclHl
, gclId
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type GuideCategoriesListResource =
"youtube" :>
"v3" :>
"guideCategories" :>
QueryParam "part" Text :>
QueryParam "regionCode" Text :>
QueryParam "hl" Text :>
QueryParam "id" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GuideCategoryListResponse
data GuideCategoriesList = GuideCategoriesList'
{ _gclPart :: !Text
, _gclRegionCode :: !(Maybe Text)
, _gclHl :: !Text
, _gclId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
guideCategoriesList
:: Text
-> GuideCategoriesList
guideCategoriesList pGclPart_ =
GuideCategoriesList'
{ _gclPart = pGclPart_
, _gclRegionCode = Nothing
, _gclHl = "en-US"
, _gclId = Nothing
}
gclPart :: Lens' GuideCategoriesList Text
gclPart = lens _gclPart (\ s a -> s{_gclPart = a})
gclRegionCode :: Lens' GuideCategoriesList (Maybe Text)
gclRegionCode
= lens _gclRegionCode
(\ s a -> s{_gclRegionCode = a})
gclHl :: Lens' GuideCategoriesList Text
gclHl = lens _gclHl (\ s a -> s{_gclHl = a})
gclId :: Lens' GuideCategoriesList (Maybe Text)
gclId = lens _gclId (\ s a -> s{_gclId = a})
instance GoogleRequest GuideCategoriesList where
type Rs GuideCategoriesList =
GuideCategoryListResponse
type Scopes GuideCategoriesList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/youtubepartner"]
requestClient GuideCategoriesList'{..}
= go (Just _gclPart) _gclRegionCode (Just _gclHl)
_gclId
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy GuideCategoriesListResource)
mempty