{-# 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.PhotosLibrary.Albums.List
(
AlbumsListResource
, albumsList
, AlbumsList
, alXgafv
, alUploadProtocol
, alPp
, alAccessToken
, alUploadType
, alBearerToken
, alPageToken
, alPageSize
, alCallback
) where
import Network.Google.PhotosLibrary.Types
import Network.Google.Prelude
type AlbumsListResource =
"v1" :>
"albums" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListAlbumsResponse
data AlbumsList = AlbumsList'
{ _alXgafv :: !(Maybe Xgafv)
, _alUploadProtocol :: !(Maybe Text)
, _alPp :: !Bool
, _alAccessToken :: !(Maybe Text)
, _alUploadType :: !(Maybe Text)
, _alBearerToken :: !(Maybe Text)
, _alPageToken :: !(Maybe Text)
, _alPageSize :: !(Maybe (Textual Int32))
, _alCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
albumsList
:: AlbumsList
albumsList =
AlbumsList'
{ _alXgafv = Nothing
, _alUploadProtocol = Nothing
, _alPp = True
, _alAccessToken = Nothing
, _alUploadType = Nothing
, _alBearerToken = Nothing
, _alPageToken = Nothing
, _alPageSize = Nothing
, _alCallback = Nothing
}
alXgafv :: Lens' AlbumsList (Maybe Xgafv)
alXgafv = lens _alXgafv (\ s a -> s{_alXgafv = a})
alUploadProtocol :: Lens' AlbumsList (Maybe Text)
alUploadProtocol
= lens _alUploadProtocol
(\ s a -> s{_alUploadProtocol = a})
alPp :: Lens' AlbumsList Bool
alPp = lens _alPp (\ s a -> s{_alPp = a})
alAccessToken :: Lens' AlbumsList (Maybe Text)
alAccessToken
= lens _alAccessToken
(\ s a -> s{_alAccessToken = a})
alUploadType :: Lens' AlbumsList (Maybe Text)
alUploadType
= lens _alUploadType (\ s a -> s{_alUploadType = a})
alBearerToken :: Lens' AlbumsList (Maybe Text)
alBearerToken
= lens _alBearerToken
(\ s a -> s{_alBearerToken = a})
alPageToken :: Lens' AlbumsList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alPageSize :: Lens' AlbumsList (Maybe Int32)
alPageSize
= lens _alPageSize (\ s a -> s{_alPageSize = a}) .
mapping _Coerce
alCallback :: Lens' AlbumsList (Maybe Text)
alCallback
= lens _alCallback (\ s a -> s{_alCallback = a})
instance GoogleRequest AlbumsList where
type Rs AlbumsList = ListAlbumsResponse
type Scopes AlbumsList =
'["https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/photoslibrary",
"https://www.googleapis.com/auth/photoslibrary.readonly",
"https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata"]
requestClient AlbumsList'{..}
= go _alXgafv _alUploadProtocol (Just _alPp)
_alAccessToken
_alUploadType
_alBearerToken
_alPageToken
_alPageSize
_alCallback
(Just AltJSON)
photosLibraryService
where go
= buildClient (Proxy :: Proxy AlbumsListResource)
mempty