| { |
| "auth": { |
| "oauth2": { |
| "scopes": { |
| "https://www.googleapis.com/auth/cloud-platform": { |
| "description": "View and manage your data across Google Cloud Platform services" |
| } |
| } |
| } |
| }, |
| "revision": "20200801", |
| "title": "Library Agent API", |
| "id": "libraryagent:v1", |
| "basePath": "", |
| "version": "v1", |
| "baseUrl": "https://libraryagent.googleapis.com/", |
| "canonicalName": "Libraryagent", |
| "rootUrl": "https://libraryagent.googleapis.com/", |
| "servicePath": "", |
| "batchPath": "batch", |
| "ownerDomain": "google.com", |
| "ownerName": "Google", |
| "mtlsRootUrl": "https://libraryagent.mtls.googleapis.com/", |
| "icons": { |
| "x32": "http://www.google.com/images/icons/product/search-32.gif", |
| "x16": "http://www.google.com/images/icons/product/search-16.gif" |
| }, |
| "parameters": { |
| "quotaUser": { |
| "type": "string", |
| "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", |
| "location": "query" |
| }, |
| "$.xgafv": { |
| "description": "V1 error format.", |
| "enum": [ |
| "1", |
| "2" |
| ], |
| "location": "query", |
| "enumDescriptions": [ |
| "v1 error format", |
| "v2 error format" |
| ], |
| "type": "string" |
| }, |
| "oauth_token": { |
| "description": "OAuth 2.0 token for the current user.", |
| "type": "string", |
| "location": "query" |
| }, |
| "callback": { |
| "location": "query", |
| "description": "JSONP", |
| "type": "string" |
| }, |
| "fields": { |
| "location": "query", |
| "type": "string", |
| "description": "Selector specifying which fields to include in a partial response." |
| }, |
| "alt": { |
| "location": "query", |
| "description": "Data format for response.", |
| "default": "json", |
| "enumDescriptions": [ |
| "Responses with Content-Type of application/json", |
| "Media download with context-dependent Content-Type", |
| "Responses with Content-Type of application/x-protobuf" |
| ], |
| "enum": [ |
| "json", |
| "media", |
| "proto" |
| ], |
| "type": "string" |
| }, |
| "key": { |
| "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", |
| "location": "query", |
| "type": "string" |
| }, |
| "prettyPrint": { |
| "description": "Returns response with indentations and line breaks.", |
| "default": "true", |
| "type": "boolean", |
| "location": "query" |
| }, |
| "uploadType": { |
| "type": "string", |
| "location": "query", |
| "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." |
| }, |
| "access_token": { |
| "type": "string", |
| "description": "OAuth access token.", |
| "location": "query" |
| }, |
| "upload_protocol": { |
| "type": "string", |
| "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", |
| "location": "query" |
| } |
| }, |
| "description": "A simple Google Example Library API.", |
| "name": "libraryagent", |
| "discoveryVersion": "v1", |
| "resources": { |
| "shelves": { |
| "resources": { |
| "books": { |
| "methods": { |
| "get": { |
| "httpMethod": "GET", |
| "description": "Gets a book. Returns NOT_FOUND if the book does not exist.", |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1Book" |
| }, |
| "parameterOrder": [ |
| "name" |
| ], |
| "path": "v1/{+name}", |
| "flatPath": "v1/shelves/{shelvesId}/books/{booksId}", |
| "parameters": { |
| "name": { |
| "type": "string", |
| "pattern": "^shelves/[^/]+/books/[^/]+$", |
| "description": "Required. The name of the book to retrieve.", |
| "required": true, |
| "location": "path" |
| } |
| }, |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "id": "libraryagent.shelves.books.get" |
| }, |
| "borrow": { |
| "httpMethod": "POST", |
| "flatPath": "v1/shelves/{shelvesId}/books/{booksId}:borrow", |
| "parameterOrder": [ |
| "name" |
| ], |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1Book" |
| }, |
| "description": "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.", |
| "id": "libraryagent.shelves.books.borrow", |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "parameters": { |
| "name": { |
| "type": "string", |
| "required": true, |
| "description": "Required. The name of the book to borrow.", |
| "location": "path", |
| "pattern": "^shelves/[^/]+/books/[^/]+$" |
| } |
| }, |
| "path": "v1/{+name}:borrow" |
| }, |
| "list": { |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1ListBooksResponse" |
| }, |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "httpMethod": "GET", |
| "path": "v1/{+parent}/books", |
| "description": "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.", |
| "parameters": { |
| "pageSize": { |
| "description": "Requested page size. Server may return fewer books than requested. If unspecified, server will pick an appropriate default.", |
| "format": "int32", |
| "location": "query", |
| "type": "integer" |
| }, |
| "parent": { |
| "pattern": "^shelves/[^/]+$", |
| "location": "path", |
| "type": "string", |
| "required": true, |
| "description": "Required. The name of the shelf whose books we'd like to list." |
| }, |
| "pageToken": { |
| "location": "query", |
| "type": "string", |
| "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBooksResponse.next_page_token. returned from the previous call to `ListBooks` method." |
| } |
| }, |
| "parameterOrder": [ |
| "parent" |
| ], |
| "flatPath": "v1/shelves/{shelvesId}/books", |
| "id": "libraryagent.shelves.books.list" |
| }, |
| "return": { |
| "id": "libraryagent.shelves.books.return", |
| "path": "v1/{+name}:return", |
| "flatPath": "v1/shelves/{shelvesId}/books/{booksId}:return", |
| "parameterOrder": [ |
| "name" |
| ], |
| "parameters": { |
| "name": { |
| "pattern": "^shelves/[^/]+/books/[^/]+$", |
| "type": "string", |
| "location": "path", |
| "description": "Required. The name of the book to return.", |
| "required": true |
| } |
| }, |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1Book" |
| }, |
| "httpMethod": "POST", |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "description": "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." |
| } |
| } |
| } |
| }, |
| "methods": { |
| "get": { |
| "parameters": { |
| "name": { |
| "required": true, |
| "type": "string", |
| "location": "path", |
| "pattern": "^shelves/[^/]+$", |
| "description": "Required. The name of the shelf to retrieve." |
| } |
| }, |
| "id": "libraryagent.shelves.get", |
| "flatPath": "v1/shelves/{shelvesId}", |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1Shelf" |
| }, |
| "httpMethod": "GET", |
| "description": "Gets a shelf. Returns NOT_FOUND if the shelf does not exist.", |
| "parameterOrder": [ |
| "name" |
| ], |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "path": "v1/{+name}" |
| }, |
| "list": { |
| "scopes": [ |
| "https://www.googleapis.com/auth/cloud-platform" |
| ], |
| "path": "v1/shelves", |
| "flatPath": "v1/shelves", |
| "id": "libraryagent.shelves.list", |
| "response": { |
| "$ref": "GoogleExampleLibraryagentV1ListShelvesResponse" |
| }, |
| "parameters": { |
| "pageSize": { |
| "type": "integer", |
| "format": "int32", |
| "description": "Requested page size. Server may return fewer shelves than requested. If unspecified, server will pick an appropriate default.", |
| "location": "query" |
| }, |
| "pageToken": { |
| "location": "query", |
| "description": "A token identifying a page of results the server should return. Typically, this is the value of ListShelvesResponse.next_page_token returned from the previous call to `ListShelves` method.", |
| "type": "string" |
| } |
| }, |
| "parameterOrder": [], |
| "description": "Lists shelves. The order is unspecified but deterministic. Newly created shelves will not necessarily be added to the end of this list.", |
| "httpMethod": "GET" |
| } |
| } |
| } |
| }, |
| "protocol": "rest", |
| "schemas": { |
| "GoogleExampleLibraryagentV1Shelf": { |
| "description": "A Shelf contains a collection of books with a theme.", |
| "type": "object", |
| "id": "GoogleExampleLibraryagentV1Shelf", |
| "properties": { |
| "name": { |
| "type": "string", |
| "description": "Output only. The resource name of the shelf. Shelf names have the form `shelves/{shelf_id}`. The name is ignored when creating a shelf." |
| }, |
| "theme": { |
| "description": "The theme of the shelf", |
| "type": "string" |
| } |
| } |
| }, |
| "GoogleExampleLibraryagentV1Book": { |
| "type": "object", |
| "properties": { |
| "read": { |
| "type": "boolean", |
| "description": "Value indicating whether the book has been read." |
| }, |
| "name": { |
| "type": "string", |
| "description": "The resource name of the book. Book names have the form `shelves/{shelf_id}/books/{book_id}`. The name is ignored when creating a book." |
| }, |
| "author": { |
| "description": "The name of the book author.", |
| "type": "string" |
| }, |
| "title": { |
| "type": "string", |
| "description": "The title of the book." |
| } |
| }, |
| "id": "GoogleExampleLibraryagentV1Book", |
| "description": "A single book in the library." |
| }, |
| "GoogleExampleLibraryagentV1ListBooksResponse": { |
| "type": "object", |
| "description": "Response message for LibraryAgent.ListBooks.", |
| "id": "GoogleExampleLibraryagentV1ListBooksResponse", |
| "properties": { |
| "nextPageToken": { |
| "type": "string", |
| "description": "A token to retrieve next page of results. Pass this value in the ListBooksRequest.page_token field in the subsequent call to `ListBooks` method to retrieve the next page of results." |
| }, |
| "books": { |
| "description": "The list of books.", |
| "type": "array", |
| "items": { |
| "$ref": "GoogleExampleLibraryagentV1Book" |
| } |
| } |
| } |
| }, |
| "GoogleExampleLibraryagentV1ListShelvesResponse": { |
| "properties": { |
| "nextPageToken": { |
| "description": "A token to retrieve next page of results. Pass this value in the ListShelvesRequest.page_token field in the subsequent call to `ListShelves` method to retrieve the next page of results.", |
| "type": "string" |
| }, |
| "shelves": { |
| "description": "The list of shelves.", |
| "type": "array", |
| "items": { |
| "$ref": "GoogleExampleLibraryagentV1Shelf" |
| } |
| } |
| }, |
| "type": "object", |
| "id": "GoogleExampleLibraryagentV1ListShelvesResponse", |
| "description": "Response message for LibraryAgent.ListShelves." |
| } |
| }, |
| "fullyEncodeReservedExpansion": true, |
| "version_module": true, |
| "documentationLink": "https://cloud.google.com/docs/quota", |
| "kind": "discovery#restDescription" |
| } |