class ShelvesBooks extends Resource (View source)

The "books" collection of methods.

Typical usage is:

 $libraryagentService = new Google\Service\Libraryagent(...);
 $books = $libraryagentService->shelves_books;

Methods

borrow(string $name, array $optParams = [])

Borrow a book from the library. Returns the book if it is borrowed successfully. Returns NOT_FOUND if the book does not exist in the library.

get(string $name, array $optParams = [])

Gets a book. Returns NOT_FOUND if the book does not exist. (books.get)

listShelvesBooks(string $parent, array $optParams = [])

Lists books in a shelf. The order is unspecified but deterministic. Newly created books will not necessarily be added to the end of this list. Returns NOT_FOUND if the shelf does not exist. (books.listShelvesBooks)

returnShelvesBooks(string $name, array $optParams = [])

Return a book to the library. Returns the book if it is returned to the library successfully. Returns error if the book does not belong to the library or the users didn't borrow before. (books.returnShelvesBooks)

Details

GoogleExampleLibraryagentV1Book borrow(string $name, array $optParams = [])

Borrow a book from the library. Returns the book if it is borrowed successfully. Returns NOT_FOUND if the book does not exist in the library.

Returns quota exceeded error if the amount of books borrowed exceeds allocation quota in any dimensions. (books.borrow)

Parameters

string $name

Required. The name of the book to borrow.

array $optParams

Optional parameters.

Return Value

GoogleExampleLibraryagentV1Book

Exceptions

Exception

GoogleExampleLibraryagentV1Book get(string $name, array $optParams = [])

Gets a book. Returns NOT_FOUND if the book does not exist. (books.get)

Parameters

string $name

Required. The name of the book to retrieve.

array $optParams

Optional parameters.

Return Value

GoogleExampleLibraryagentV1Book

Exceptions

Exception

GoogleExampleLibraryagentV1ListBooksResponse listShelvesBooks(string $parent, array $optParams = [])

Lists books in a shelf. The order is unspecified but deterministic. Newly created books will not necessarily be added to the end of this list. Returns NOT_FOUND if the shelf does not exist. (books.listShelvesBooks)

Parameters

string $parent

Required. The name of the shelf whose books we'd like to list.

array $optParams

Optional parameters.

Return Value

GoogleExampleLibraryagentV1ListBooksResponse

Exceptions

Exception

GoogleExampleLibraryagentV1Book returnShelvesBooks(string $name, array $optParams = [])

Return a book to the library. Returns the book if it is returned to the library successfully. Returns error if the book does not belong to the library or the users didn't borrow before. (books.returnShelvesBooks)

Parameters

string $name

Required. The name of the book to return.

array $optParams

Optional parameters.

Return Value

GoogleExampleLibraryagentV1Book

Exceptions

Exception