{-# 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.SuperChatEvents.List
(
SuperChatEventsListResource
, superChatEventsList
, SuperChatEventsList
, scelPart
, scelHl
, scelPageToken
, scelMaxResults
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type SuperChatEventsListResource =
"youtube" :>
"v3" :>
"superChatEvents" :>
QueryParam "part" Text :>
QueryParam "hl" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] SuperChatEventListResponse
data SuperChatEventsList = SuperChatEventsList'
{ _scelPart :: !Text
, _scelHl :: !(Maybe Text)
, _scelPageToken :: !(Maybe Text)
, _scelMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
superChatEventsList
:: Text
-> SuperChatEventsList
superChatEventsList pScelPart_ =
SuperChatEventsList'
{ _scelPart = pScelPart_
, _scelHl = Nothing
, _scelPageToken = Nothing
, _scelMaxResults = 5
}
scelPart :: Lens' SuperChatEventsList Text
scelPart = lens _scelPart (\ s a -> s{_scelPart = a})
scelHl :: Lens' SuperChatEventsList (Maybe Text)
scelHl = lens _scelHl (\ s a -> s{_scelHl = a})
scelPageToken :: Lens' SuperChatEventsList (Maybe Text)
scelPageToken
= lens _scelPageToken
(\ s a -> s{_scelPageToken = a})
scelMaxResults :: Lens' SuperChatEventsList Word32
scelMaxResults
= lens _scelMaxResults
(\ s a -> s{_scelMaxResults = a})
. _Coerce
instance GoogleRequest SuperChatEventsList where
type Rs SuperChatEventsList =
SuperChatEventListResponse
type Scopes SuperChatEventsList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtube.readonly"]
requestClient SuperChatEventsList'{..}
= go (Just _scelPart) _scelHl _scelPageToken
(Just _scelMaxResults)
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy SuperChatEventsListResource)
mempty