{-# 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.Comments.List
(
CommentsListResource
, commentsList
, CommentsList
, cllPart
, cllId
, cllPageToken
, cllTextFormat
, cllMaxResults
, cllParentId
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentsListResource =
"youtube" :>
"v3" :>
"comments" :>
QueryParam "part" Text :>
QueryParam "id" Text :>
QueryParam "pageToken" Text :>
QueryParam "textFormat" CommentsListTextFormat :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "parentId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] CommentListResponse
data CommentsList = CommentsList'
{ _cllPart :: !Text
, _cllId :: !(Maybe Text)
, _cllPageToken :: !(Maybe Text)
, _cllTextFormat :: !CommentsListTextFormat
, _cllMaxResults :: !(Textual Word32)
, _cllParentId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
commentsList
:: Text
-> CommentsList
commentsList pCllPart_ =
CommentsList'
{ _cllPart = pCllPart_
, _cllId = Nothing
, _cllPageToken = Nothing
, _cllTextFormat = HTML
, _cllMaxResults = 20
, _cllParentId = Nothing
}
cllPart :: Lens' CommentsList Text
cllPart = lens _cllPart (\ s a -> s{_cllPart = a})
cllId :: Lens' CommentsList (Maybe Text)
cllId = lens _cllId (\ s a -> s{_cllId = a})
cllPageToken :: Lens' CommentsList (Maybe Text)
cllPageToken
= lens _cllPageToken (\ s a -> s{_cllPageToken = a})
cllTextFormat :: Lens' CommentsList CommentsListTextFormat
cllTextFormat
= lens _cllTextFormat
(\ s a -> s{_cllTextFormat = a})
cllMaxResults :: Lens' CommentsList Word32
cllMaxResults
= lens _cllMaxResults
(\ s a -> s{_cllMaxResults = a})
. _Coerce
cllParentId :: Lens' CommentsList (Maybe Text)
cllParentId
= lens _cllParentId (\ s a -> s{_cllParentId = a})
instance GoogleRequest CommentsList where
type Rs CommentsList = CommentListResponse
type Scopes CommentsList =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentsList'{..}
= go (Just _cllPart) _cllId _cllPageToken
(Just _cllTextFormat)
(Just _cllMaxResults)
_cllParentId
(Just AltJSON)
youTubeService
where go
= buildClient (Proxy :: Proxy CommentsListResource)
mempty