{-# 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.SharedAlbums.List
(
SharedAlbumsListResource
, sharedAlbumsList
, SharedAlbumsList
, salXgafv
, salUploadProtocol
, salPp
, salAccessToken
, salUploadType
, salBearerToken
, salPageToken
, salPageSize
, salCallback
) where
import Network.Google.PhotosLibrary.Types
import Network.Google.Prelude
type SharedAlbumsListResource =
"v1" :>
"sharedAlbums" :>
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] ListSharedAlbumsResponse
data SharedAlbumsList = SharedAlbumsList'
{ _salXgafv :: !(Maybe Xgafv)
, _salUploadProtocol :: !(Maybe Text)
, _salPp :: !Bool
, _salAccessToken :: !(Maybe Text)
, _salUploadType :: !(Maybe Text)
, _salBearerToken :: !(Maybe Text)
, _salPageToken :: !(Maybe Text)
, _salPageSize :: !(Maybe (Textual Int32))
, _salCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
sharedAlbumsList
:: SharedAlbumsList
sharedAlbumsList =
SharedAlbumsList'
{ _salXgafv = Nothing
, _salUploadProtocol = Nothing
, _salPp = True
, _salAccessToken = Nothing
, _salUploadType = Nothing
, _salBearerToken = Nothing
, _salPageToken = Nothing
, _salPageSize = Nothing
, _salCallback = Nothing
}
salXgafv :: Lens' SharedAlbumsList (Maybe Xgafv)
salXgafv = lens _salXgafv (\ s a -> s{_salXgafv = a})
salUploadProtocol :: Lens' SharedAlbumsList (Maybe Text)
salUploadProtocol
= lens _salUploadProtocol
(\ s a -> s{_salUploadProtocol = a})
salPp :: Lens' SharedAlbumsList Bool
salPp = lens _salPp (\ s a -> s{_salPp = a})
salAccessToken :: Lens' SharedAlbumsList (Maybe Text)
salAccessToken
= lens _salAccessToken
(\ s a -> s{_salAccessToken = a})
salUploadType :: Lens' SharedAlbumsList (Maybe Text)
salUploadType
= lens _salUploadType
(\ s a -> s{_salUploadType = a})
salBearerToken :: Lens' SharedAlbumsList (Maybe Text)
salBearerToken
= lens _salBearerToken
(\ s a -> s{_salBearerToken = a})
salPageToken :: Lens' SharedAlbumsList (Maybe Text)
salPageToken
= lens _salPageToken (\ s a -> s{_salPageToken = a})
salPageSize :: Lens' SharedAlbumsList (Maybe Int32)
salPageSize
= lens _salPageSize (\ s a -> s{_salPageSize = a}) .
mapping _Coerce
salCallback :: Lens' SharedAlbumsList (Maybe Text)
salCallback
= lens _salCallback (\ s a -> s{_salCallback = a})
instance GoogleRequest SharedAlbumsList where
type Rs SharedAlbumsList = ListSharedAlbumsResponse
type Scopes SharedAlbumsList =
'["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 SharedAlbumsList'{..}
= go _salXgafv _salUploadProtocol (Just _salPp)
_salAccessToken
_salUploadType
_salBearerToken
_salPageToken
_salPageSize
_salCallback
(Just AltJSON)
photosLibraryService
where go
= buildClient
(Proxy :: Proxy SharedAlbumsListResource)
mempty