{-# 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.LiveChatMessages.List
(
LiveChatMessagesListResource
, liveChatMessagesList
, LiveChatMessagesList
, lcmlPart
, lcmlLiveChatId
, lcmlHl
, lcmlPageToken
, lcmlMaxResults
, lcmlProFileImageSize
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type LiveChatMessagesListResource =
"youtube" :>
"v3" :>
"liveChat" :>
"messages" :>
QueryParam "liveChatId" Text :>
QueryParam "part" Text :>
QueryParam "hl" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "profileImageSize" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] LiveChatMessageListResponse
data LiveChatMessagesList = LiveChatMessagesList'
{ _lcmlPart :: !Text
, _lcmlLiveChatId :: !Text
, _lcmlHl :: !(Maybe Text)
, _lcmlPageToken :: !(Maybe Text)
, _lcmlMaxResults :: !(Textual Word32)
, _lcmlProFileImageSize :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
liveChatMessagesList
:: Text
-> Text
-> LiveChatMessagesList
liveChatMessagesList pLcmlPart_ pLcmlLiveChatId_ =
LiveChatMessagesList'
{ _lcmlPart = pLcmlPart_
, _lcmlLiveChatId = pLcmlLiveChatId_
, _lcmlHl = Nothing
, _lcmlPageToken = Nothing
, _lcmlMaxResults = 500
, _lcmlProFileImageSize = Nothing
}
lcmlPart :: Lens' LiveChatMessagesList Text
lcmlPart = lens _lcmlPart (\ s a -> s{_lcmlPart = a})
lcmlLiveChatId :: Lens' LiveChatMessagesList Text
lcmlLiveChatId
= lens _lcmlLiveChatId
(\ s a -> s{_lcmlLiveChatId = a})
lcmlHl :: Lens' LiveChatMessagesList (Maybe Text)
lcmlHl = lens _lcmlHl (\ s a -> s{_lcmlHl = a})
lcmlPageToken :: Lens' LiveChatMessagesList (Maybe Text)
lcmlPageToken
= lens _lcmlPageToken
(\ s a -> s{_lcmlPageToken = a})
lcmlMaxResults :: Lens' LiveChatMessagesList Word32
lcmlMaxResults
= lens _lcmlMaxResults
(\ s a -> s{_lcmlMaxResults = a})
. _Coerce
lcmlProFileImageSize :: Lens' LiveChatMessagesList (Maybe Word32)
lcmlProFileImageSize
= lens _lcmlProFileImageSize
(\ s a -> s{_lcmlProFileImageSize = a})
. mapping _Coerce
instance GoogleRequest LiveChatMessagesList where
type Rs LiveChatMessagesList =
LiveChatMessageListResponse
type Scopes LiveChatMessagesList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.force-ssl",
"https://www.googleapis.com/auth/youtube.readonly"]
requestClient LiveChatMessagesList'{..}
= go (Just _lcmlLiveChatId) (Just _lcmlPart) _lcmlHl
_lcmlPageToken
(Just _lcmlMaxResults)
_lcmlProFileImageSize
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy LiveChatMessagesListResource)
mempty