{-# 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.CommentThreads.List
(
CommentThreadsListResource
, commentThreadsList
, CommentThreadsList
, ctlPart
, ctlModerationStatus
, ctlSearchTerms
, ctlChannelId
, ctlAllThreadsRelatedToChannelId
, ctlVideoId
, ctlId
, ctlPageToken
, ctlOrder
, ctlTextFormat
, ctlMaxResults
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentThreadsListResource =
"youtube" :>
"v3" :>
"commentThreads" :>
QueryParam "part" Text :>
QueryParam "moderationStatus"
CommentThreadsListModerationStatus
:>
QueryParam "searchTerms" Text :>
QueryParam "channelId" Text :>
QueryParam "allThreadsRelatedToChannelId" Text :>
QueryParam "videoId" Text :>
QueryParam "id" Text :>
QueryParam "pageToken" Text :>
QueryParam "order" CommentThreadsListOrder :>
QueryParam "textFormat"
CommentThreadsListTextFormat
:>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CommentThreadListResponse
data CommentThreadsList = CommentThreadsList'
{ _ctlPart :: !Text
, _ctlModerationStatus :: !CommentThreadsListModerationStatus
, _ctlSearchTerms :: !(Maybe Text)
, _ctlChannelId :: !(Maybe Text)
, _ctlAllThreadsRelatedToChannelId :: !(Maybe Text)
, _ctlVideoId :: !(Maybe Text)
, _ctlId :: !(Maybe Text)
, _ctlPageToken :: !(Maybe Text)
, _ctlOrder :: !CommentThreadsListOrder
, _ctlTextFormat :: !CommentThreadsListTextFormat
, _ctlMaxResults :: !(Textual Word32)
} deriving (Eq,Show,Data,Typeable,Generic)
commentThreadsList
:: Text
-> CommentThreadsList
commentThreadsList pCtlPart_ =
CommentThreadsList'
{ _ctlPart = pCtlPart_
, _ctlModerationStatus = Published
, _ctlSearchTerms = Nothing
, _ctlChannelId = Nothing
, _ctlAllThreadsRelatedToChannelId = Nothing
, _ctlVideoId = Nothing
, _ctlId = Nothing
, _ctlPageToken = Nothing
, _ctlOrder = CTLOTime
, _ctlTextFormat = CTLTFHTML
, _ctlMaxResults = 20
}
ctlPart :: Lens' CommentThreadsList Text
ctlPart = lens _ctlPart (\ s a -> s{_ctlPart = a})
ctlModerationStatus :: Lens' CommentThreadsList CommentThreadsListModerationStatus
ctlModerationStatus
= lens _ctlModerationStatus
(\ s a -> s{_ctlModerationStatus = a})
ctlSearchTerms :: Lens' CommentThreadsList (Maybe Text)
ctlSearchTerms
= lens _ctlSearchTerms
(\ s a -> s{_ctlSearchTerms = a})
ctlChannelId :: Lens' CommentThreadsList (Maybe Text)
ctlChannelId
= lens _ctlChannelId (\ s a -> s{_ctlChannelId = a})
ctlAllThreadsRelatedToChannelId :: Lens' CommentThreadsList (Maybe Text)
ctlAllThreadsRelatedToChannelId
= lens _ctlAllThreadsRelatedToChannelId
(\ s a -> s{_ctlAllThreadsRelatedToChannelId = a})
ctlVideoId :: Lens' CommentThreadsList (Maybe Text)
ctlVideoId
= lens _ctlVideoId (\ s a -> s{_ctlVideoId = a})
ctlId :: Lens' CommentThreadsList (Maybe Text)
ctlId = lens _ctlId (\ s a -> s{_ctlId = a})
ctlPageToken :: Lens' CommentThreadsList (Maybe Text)
ctlPageToken
= lens _ctlPageToken (\ s a -> s{_ctlPageToken = a})
ctlOrder :: Lens' CommentThreadsList CommentThreadsListOrder
ctlOrder = lens _ctlOrder (\ s a -> s{_ctlOrder = a})
ctlTextFormat :: Lens' CommentThreadsList CommentThreadsListTextFormat
ctlTextFormat
= lens _ctlTextFormat
(\ s a -> s{_ctlTextFormat = a})
ctlMaxResults :: Lens' CommentThreadsList Word32
ctlMaxResults
= lens _ctlMaxResults
(\ s a -> s{_ctlMaxResults = a})
. _Coerce
instance GoogleRequest CommentThreadsList where
type Rs CommentThreadsList =
CommentThreadListResponse
type Scopes CommentThreadsList =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentThreadsList'{..}
= go (Just _ctlPart) (Just _ctlModerationStatus)
_ctlSearchTerms
_ctlChannelId
_ctlAllThreadsRelatedToChannelId
_ctlVideoId
_ctlId
_ctlPageToken
(Just _ctlOrder)
(Just _ctlTextFormat)
(Just _ctlMaxResults)
(Just AltJSON)
youTubeService
where go
= buildClient
(Proxy :: Proxy CommentThreadsListResource)
mempty