Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

LibraryAgent

import { LibraryAgent } from "https://googleapis.deno.dev/v1/libraryagent:v1.ts";

A simple Google Example Library API.

class LibraryAgent {
constructor(client?: CredentialsClient, baseUrl?: string);
async shelvesBooksBorrow(name: string): Promise<GoogleExampleLibraryagentV1Book>;
async shelvesBooksGet(name: string): Promise<GoogleExampleLibraryagentV1Book>;
async shelvesBooksList(parent: string, opts?: ShelvesBooksListOptions): Promise<GoogleExampleLibraryagentV1ListBooksResponse>;
async shelvesBooksReturn(name: string): Promise<GoogleExampleLibraryagentV1Book>;
async shelvesGet(name: string): Promise<GoogleExampleLibraryagentV1Shelf>;
}

§Constructors

§
new LibraryAgent(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
shelvesBooksBorrow(name: string): Promise<GoogleExampleLibraryagentV1Book>
[src]

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.

@param name

Required. The name of the book to borrow.

§
shelvesBooksGet(name: string): Promise<GoogleExampleLibraryagentV1Book>
[src]

Gets a book. Returns NOT_FOUND if the book does not exist.

@param name

Required. The name of the book to retrieve.

§
shelvesBooksList(parent: string, opts?: ShelvesBooksListOptions): Promise<GoogleExampleLibraryagentV1ListBooksResponse>
[src]

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.

@param parent

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

§
shelvesBooksReturn(name: string): Promise<GoogleExampleLibraryagentV1Book>
[src]

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.

@param name

Required. The name of the book to return.

§
shelvesGet(name: string): Promise<GoogleExampleLibraryagentV1Shelf>
[src]

Gets a shelf. Returns NOT_FOUND if the shelf does not exist.

@param name

Required. The name of the shelf to retrieve.

§

Lists shelves. The order is unspecified but deterministic. Newly created shelves will not necessarily be added to the end of this list.