{-# 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.LiveChatModerators.List
(
LiveChatModeratorsListResource
, liveChatModeratorsList
, LiveChatModeratorsList
, livPart
, livLiveChatId
, livPageToken
, livMaxResults
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type LiveChatModeratorsListResource =
"youtube" :>
"v3" :>
"liveChat" :>
"moderators" :>
QueryParam "liveChatId" Text :>
QueryParam "part" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LiveChatModeratorListResponse
data LiveChatModeratorsList = LiveChatModeratorsList'
{ _livPart :: !Text
, _livLiveChatId :: !Text
, _livPageToken :: !(Maybe Text)
, _livMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
liveChatModeratorsList
:: Text
-> Text
-> LiveChatModeratorsList
liveChatModeratorsList pLivPart_ pLivLiveChatId_ =
LiveChatModeratorsList'
{ _livPart = pLivPart_
, _livLiveChatId = pLivLiveChatId_
, _livPageToken = Nothing
, _livMaxResults = 5
}
livPart :: Lens' LiveChatModeratorsList Text
livPart = lens _livPart (\ s a -> s{_livPart = a})
livLiveChatId :: Lens' LiveChatModeratorsList Text
livLiveChatId
= lens _livLiveChatId
(\ s a -> s{_livLiveChatId = a})
livPageToken :: Lens' LiveChatModeratorsList (Maybe Text)
livPageToken
= lens _livPageToken (\ s a -> s{_livPageToken = a})
livMaxResults :: Lens' LiveChatModeratorsList Word32
livMaxResults
= lens _livMaxResults
(\ s a -> s{_livMaxResults = a})
. _Coerce
instance GoogleRequest LiveChatModeratorsList where
type Rs LiveChatModeratorsList =
LiveChatModeratorListResponse
type Scopes LiveChatModeratorsList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtube.readonly"]
requestClient LiveChatModeratorsList'{..}
= go (Just _livLiveChatId) (Just _livPart)
_livPageToken
(Just _livMaxResults)
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy LiveChatModeratorsListResource)
mempty