{-# 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.Books.Bookshelves.Volumes.List
(
BookshelvesVolumesListResource
, bookshelvesVolumesList
, BookshelvesVolumesList
, bvlUserId
, bvlShelf
, bvlSource
, bvlStartIndex
, bvlMaxResults
, bvlShowPreOrders
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type BookshelvesVolumesListResource =
"books" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"bookshelves" :>
Capture "shelf" Text :>
"volumes" :>
QueryParam "source" Text :>
QueryParam "startIndex" (Textual Word32) :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "showPreorders" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] Volumes
data BookshelvesVolumesList = BookshelvesVolumesList'
{ _bvlUserId :: !Text
, _bvlShelf :: !Text
, _bvlSource :: !(Maybe Text)
, _bvlStartIndex :: !(Maybe (Textual Word32))
, _bvlMaxResults :: !(Maybe (Textual Word32))
, _bvlShowPreOrders :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
bookshelvesVolumesList
:: Text
-> Text
-> BookshelvesVolumesList
bookshelvesVolumesList pBvlUserId_ pBvlShelf_ =
BookshelvesVolumesList'
{ _bvlUserId = pBvlUserId_
, _bvlShelf = pBvlShelf_
, _bvlSource = Nothing
, _bvlStartIndex = Nothing
, _bvlMaxResults = Nothing
, _bvlShowPreOrders = Nothing
}
bvlUserId :: Lens' BookshelvesVolumesList Text
bvlUserId
= lens _bvlUserId (\ s a -> s{_bvlUserId = a})
bvlShelf :: Lens' BookshelvesVolumesList Text
bvlShelf = lens _bvlShelf (\ s a -> s{_bvlShelf = a})
bvlSource :: Lens' BookshelvesVolumesList (Maybe Text)
bvlSource
= lens _bvlSource (\ s a -> s{_bvlSource = a})
bvlStartIndex :: Lens' BookshelvesVolumesList (Maybe Word32)
bvlStartIndex
= lens _bvlStartIndex
(\ s a -> s{_bvlStartIndex = a})
. mapping _Coerce
bvlMaxResults :: Lens' BookshelvesVolumesList (Maybe Word32)
bvlMaxResults
= lens _bvlMaxResults
(\ s a -> s{_bvlMaxResults = a})
. mapping _Coerce
bvlShowPreOrders :: Lens' BookshelvesVolumesList (Maybe Bool)
bvlShowPreOrders
= lens _bvlShowPreOrders
(\ s a -> s{_bvlShowPreOrders = a})
instance GoogleRequest BookshelvesVolumesList where
type Rs BookshelvesVolumesList = Volumes
type Scopes BookshelvesVolumesList =
'["https://www.googleapis.com/auth/books"]
requestClient BookshelvesVolumesList'{..}
= go _bvlUserId _bvlShelf _bvlSource _bvlStartIndex
_bvlMaxResults
_bvlShowPreOrders
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy BookshelvesVolumesListResource)
mempty