{-# 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.List
(
BookshelvesListResource
, bookshelvesList
, BookshelvesList
, blUserId
, blSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type BookshelvesListResource =
"books" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"bookshelves" :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Bookshelves
data BookshelvesList = BookshelvesList'
{ _blUserId :: !Text
, _blSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
bookshelvesList
:: Text
-> BookshelvesList
bookshelvesList pBlUserId_ =
BookshelvesList'
{ _blUserId = pBlUserId_
, _blSource = Nothing
}
blUserId :: Lens' BookshelvesList Text
blUserId = lens _blUserId (\ s a -> s{_blUserId = a})
blSource :: Lens' BookshelvesList (Maybe Text)
blSource = lens _blSource (\ s a -> s{_blSource = a})
instance GoogleRequest BookshelvesList where
type Rs BookshelvesList = Bookshelves
type Scopes BookshelvesList =
'["https://www.googleapis.com/auth/books"]
requestClient BookshelvesList'{..}
= go _blUserId _blSource (Just AltJSON) booksService
where go
= buildClient
(Proxy :: Proxy BookshelvesListResource)
mempty