{-# 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.Insert
(
CommentsInsertResource
, commentsInsert
, CommentsInsert
, comPart
, comPayload
) where
import Network.Google.Prelude
import Network.Google.YouTube.Types
type CommentsInsertResource =
"youtube" :>
"v3" :>
"comments" :>
QueryParam "part" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Comment :> Post '[JSON] Comment
data CommentsInsert = CommentsInsert'
{ _comPart :: !Text
, _comPayload :: !Comment
} deriving (Eq,Show,Data,Typeable,Generic)
commentsInsert
:: Text
-> Comment
-> CommentsInsert
commentsInsert pComPart_ pComPayload_ =
CommentsInsert'
{ _comPart = pComPart_
, _comPayload = pComPayload_
}
comPart :: Lens' CommentsInsert Text
comPart = lens _comPart (\ s a -> s{_comPart = a})
comPayload :: Lens' CommentsInsert Comment
comPayload
= lens _comPayload (\ s a -> s{_comPayload = a})
instance GoogleRequest CommentsInsert where
type Rs CommentsInsert = Comment
type Scopes CommentsInsert =
'["https://www.googleapis.com/auth/youtube.force-ssl"]
requestClient CommentsInsert'{..}
= go (Just _comPart) (Just AltJSON) _comPayload
youTubeService
where go
= buildClient (Proxy :: Proxy CommentsInsertResource)
mempty