{-# 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.YouTubeAnalytics.Groups.List
(
GroupsListResource
, groupsList
, GroupsList
, glXgafv
, glMine
, glUploadProtocol
, glAccessToken
, glUploadType
, glOnBehalfOfContentOwner
, glId
, glPageToken
, glCallback
) where
import Network.Google.Prelude
import Network.Google.YouTubeAnalytics.Types
type GroupsListResource =
"v2" :>
"groups" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "mine" Bool :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "onBehalfOfContentOwner" Text :>
QueryParam "id" Text :>
QueryParam "pageToken" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListGroupsResponse
data GroupsList = GroupsList'
{ _glXgafv :: !(Maybe Xgafv)
, _glMine :: !(Maybe Bool)
, _glUploadProtocol :: !(Maybe Text)
, _glAccessToken :: !(Maybe Text)
, _glUploadType :: !(Maybe Text)
, _glOnBehalfOfContentOwner :: !(Maybe Text)
, _glId :: !(Maybe Text)
, _glPageToken :: !(Maybe Text)
, _glCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupsList
:: GroupsList
groupsList =
GroupsList'
{ _glXgafv = Nothing
, _glMine = Nothing
, _glUploadProtocol = Nothing
, _glAccessToken = Nothing
, _glUploadType = Nothing
, _glOnBehalfOfContentOwner = Nothing
, _glId = Nothing
, _glPageToken = Nothing
, _glCallback = Nothing
}
glXgafv :: Lens' GroupsList (Maybe Xgafv)
glXgafv = lens _glXgafv (\ s a -> s{_glXgafv = a})
glMine :: Lens' GroupsList (Maybe Bool)
glMine = lens _glMine (\ s a -> s{_glMine = a})
glUploadProtocol :: Lens' GroupsList (Maybe Text)
glUploadProtocol
= lens _glUploadProtocol
(\ s a -> s{_glUploadProtocol = a})
glAccessToken :: Lens' GroupsList (Maybe Text)
glAccessToken
= lens _glAccessToken
(\ s a -> s{_glAccessToken = a})
glUploadType :: Lens' GroupsList (Maybe Text)
glUploadType
= lens _glUploadType (\ s a -> s{_glUploadType = a})
glOnBehalfOfContentOwner :: Lens' GroupsList (Maybe Text)
glOnBehalfOfContentOwner
= lens _glOnBehalfOfContentOwner
(\ s a -> s{_glOnBehalfOfContentOwner = a})
glId :: Lens' GroupsList (Maybe Text)
glId = lens _glId (\ s a -> s{_glId = a})
glPageToken :: Lens' GroupsList (Maybe Text)
glPageToken
= lens _glPageToken (\ s a -> s{_glPageToken = a})
glCallback :: Lens' GroupsList (Maybe Text)
glCallback
= lens _glCallback (\ s a -> s{_glCallback = a})
instance GoogleRequest GroupsList where
type Rs GroupsList = ListGroupsResponse
type Scopes GroupsList =
'["https://www.googleapis.com/auth/youtube",
"https://www.googleapis.com/auth/youtube.readonly",
"https://www.googleapis.com/auth/youtubepartner",
"https://www.googleapis.com/auth/yt-analytics-monetary.readonly",
"https://www.googleapis.com/auth/yt-analytics.readonly"]
requestClient GroupsList'{..}
= go _glXgafv _glMine _glUploadProtocol
_glAccessToken
_glUploadType
_glOnBehalfOfContentOwner
_glId
_glPageToken
_glCallback
(Just AltJSON)
youTubeAnalyticsService
where go
= buildClient (Proxy :: Proxy GroupsListResource)
mempty