{-# 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.Get
(
BookshelvesGetResource
, bookshelvesGet
, BookshelvesGet
, bgUserId
, bgShelf
, bgSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type BookshelvesGetResource =
"books" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"bookshelves" :>
Capture "shelf" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Bookshelf
data BookshelvesGet = BookshelvesGet'
{ _bgUserId :: !Text
, _bgShelf :: !Text
, _bgSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
bookshelvesGet
:: Text
-> Text
-> BookshelvesGet
bookshelvesGet pBgUserId_ pBgShelf_ =
BookshelvesGet'
{ _bgUserId = pBgUserId_
, _bgShelf = pBgShelf_
, _bgSource = Nothing
}
bgUserId :: Lens' BookshelvesGet Text
bgUserId = lens _bgUserId (\ s a -> s{_bgUserId = a})
bgShelf :: Lens' BookshelvesGet Text
bgShelf = lens _bgShelf (\ s a -> s{_bgShelf = a})
bgSource :: Lens' BookshelvesGet (Maybe Text)
bgSource = lens _bgSource (\ s a -> s{_bgSource = a})
instance GoogleRequest BookshelvesGet where
type Rs BookshelvesGet = Bookshelf
type Scopes BookshelvesGet =
'["https://www.googleapis.com/auth/books"]
requestClient BookshelvesGet'{..}
= go _bgUserId _bgShelf _bgSource (Just AltJSON)
booksService
where go
= buildClient (Proxy :: Proxy BookshelvesGetResource)
mempty