{-# 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.VideoCategories.List
(
VideoCategoriesListResource
, videoCategoriesList
, VideoCategoriesList
, vclPart
, vclRegionCode
, vclHl
, vclId
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type VideoCategoriesListResource =
"youtube" :>
"v3" :>
"videoCategories" :>
QueryParam "part" Text :>
QueryParam "regionCode" Text :>
QueryParam "hl" Text :>
QueryParam "id" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] VideoCategoryListResponse
data VideoCategoriesList = VideoCategoriesList'
{ _vclPart :: !Text
, _vclRegionCode :: !(Maybe Text)
, _vclHl :: !Text
, _vclId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
videoCategoriesList
:: Text
-> VideoCategoriesList
videoCategoriesList pVclPart_ =
VideoCategoriesList'
{ _vclPart = pVclPart_
, _vclRegionCode = Nothing
, _vclHl = "en_US"
, _vclId = Nothing
}
vclPart :: Lens' VideoCategoriesList Text
vclPart = lens _vclPart (\ s a -> s{_vclPart = a})
vclRegionCode :: Lens' VideoCategoriesList (Maybe Text)
vclRegionCode
= lens _vclRegionCode
(\ s a -> s{_vclRegionCode = a})
vclHl :: Lens' VideoCategoriesList Text
vclHl = lens _vclHl (\ s a -> s{_vclHl = a})
vclId :: Lens' VideoCategoriesList (Maybe Text)
vclId = lens _vclId (\ s a -> s{_vclId = a})
instance GoogleRequest VideoCategoriesList where
type Rs VideoCategoriesList =
VideoCategoryListResponse
type Scopes VideoCategoriesList =
'["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 VideoCategoriesList'{..}
= go (Just _vclPart) _vclRegionCode (Just _vclHl)
_vclId
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy VideoCategoriesListResource)
mempty