UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 12.4 kB
{"openapi":"3.0.0","servers":[{"url":"https://libraryagent.googleapis.com/"}],"info":{"contact":{"name":"Google","url":"https://google.com","x-twitter":"youtube"},"description":"A simple Google Example Library API.","license":{"name":"Creative Commons Attribution 3.0","url":"http://creativecommons.org/licenses/by/3.0/"},"termsOfService":"https://developers.google.com/terms/","title":"Library Agent API","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["analytics","media"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/mermade/oas-kit","version":"7.0.4"},"format":"google","url":"https://libraryagent.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-providerName":"googleapis.com","x-serviceName":"libraryagent"},"externalDocs":{"url":"https://cloud.google.com/docs/quota"},"tags":[{"name":"shelves"}],"paths":{"/v1/shelves":{"get":{"description":"Lists shelves. The order is unspecified but deterministic. Newly created shelves will not necessarily be added to the end of this list.","operationId":"libraryagent.shelves.list","parameters":[{"description":"Requested page size. Server may return fewer shelves than requested. If unspecified, server will pick an appropriate default.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"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.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1ListShelvesResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["shelves"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/{name}":{"get":{"description":"Gets a book. Returns NOT_FOUND if the book does not exist.","operationId":"libraryagent.shelves.books.get","parameters":[{"description":"Required. The name of the book to retrieve.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1Book"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["shelves"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]},"/v1/{name}:borrow":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"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.","operationId":"libraryagent.shelves.books.borrow","parameters":[{"description":"Required. The name of the book to borrow.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1Book"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["shelves"]}},"/v1/{name}:return":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}],"post":{"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.","operationId":"libraryagent.shelves.books.return","parameters":[{"description":"Required. The name of the book to return.","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1Book"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["shelves"]}},"/v1/{parent}/books":{"get":{"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.","operationId":"libraryagent.shelves.books.list","parameters":[{"description":"Required. The name of the shelf whose books we'd like to list.","in":"path","name":"parent","required":true,"schema":{"type":"string"}},{"description":"Requested page size. Server may return fewer books than requested. If unspecified, server will pick an appropriate default.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"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.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1ListBooksResponse"}}},"description":"Successful response"}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"],"Oauth2c":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["shelves"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/upload_protocol"},{"$ref":"#/components/parameters/uploadType"}]}},"components":{"parameters":{"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"enum":["1","2"],"type":"string"}},"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"enum":["json","media","proto"],"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"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.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean"}},"quotaUser":{"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.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}}},"schemas":{"GoogleExampleLibraryagentV1Book":{"description":"A single book in the library.","properties":{"author":{"description":"The name of the book author.","type":"string"},"name":{"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.","type":"string"},"read":{"description":"Value indicating whether the book has been read.","type":"boolean"},"title":{"description":"The title of the book.","type":"string"}},"type":"object"},"GoogleExampleLibraryagentV1ListBooksResponse":{"description":"Response message for LibraryAgent.ListBooks.","properties":{"books":{"description":"The list of books.","items":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1Book"},"type":"array"},"nextPageToken":{"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.","type":"string"}},"type":"object"},"GoogleExampleLibraryagentV1ListShelvesResponse":{"description":"Response message for LibraryAgent.ListShelves.","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.","items":{"$ref":"#/components/schemas/GoogleExampleLibraryagentV1Shelf"},"type":"array"}},"type":"object"},"GoogleExampleLibraryagentV1Shelf":{"description":"A Shelf contains a collection of books with a theme.","properties":{"name":{"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.","type":"string"},"theme":{"description":"The theme of the shelf","type":"string"}},"type":"object"}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 implicit authentication","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/cloud-platform":"See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."}}},"type":"oauth2"},"Oauth2c":{"description":"Oauth 2.0 authorizationCode authentication","flows":{"authorizationCode":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/cloud-platform":"See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."},"tokenUrl":"https://accounts.google.com/o/oauth2/token"}},"type":"oauth2"}}}}