{-# 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.MyLibrary.Bookshelves.Get
(
MyLibraryBookshelvesGetResource
, myLibraryBookshelvesGet
, MyLibraryBookshelvesGet
, mlbgShelf
, mlbgSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryBookshelvesGetResource =
"books" :>
"v1" :>
"mylibrary" :>
"bookshelves" :>
Capture "shelf" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Bookshelf
data MyLibraryBookshelvesGet = MyLibraryBookshelvesGet'
{ _mlbgShelf :: !Text
, _mlbgSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryBookshelvesGet
:: Text
-> MyLibraryBookshelvesGet
myLibraryBookshelvesGet pMlbgShelf_ =
MyLibraryBookshelvesGet'
{ _mlbgShelf = pMlbgShelf_
, _mlbgSource = Nothing
}
mlbgShelf :: Lens' MyLibraryBookshelvesGet Text
mlbgShelf
= lens _mlbgShelf (\ s a -> s{_mlbgShelf = a})
mlbgSource :: Lens' MyLibraryBookshelvesGet (Maybe Text)
mlbgSource
= lens _mlbgSource (\ s a -> s{_mlbgSource = a})
instance GoogleRequest MyLibraryBookshelvesGet where
type Rs MyLibraryBookshelvesGet = Bookshelf
type Scopes MyLibraryBookshelvesGet =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryBookshelvesGet'{..}
= go _mlbgShelf _mlbgSource (Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy MyLibraryBookshelvesGetResource)
mempty