Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="libraryagent_v1.html">Library Agent API</a> . <a href="libraryagent_v1.shelves.html">shelves</a> . <a href="libraryagent_v1.shelves.books.html">books</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#borrow">borrow(name, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Borrow a book from the library. Returns the book if it is borrowed</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Gets a book. Returns NOT_FOUND if the book does not exist.</p> |
| 83 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 84 | <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 85 | <p class="firstline">Lists books in a shelf. The order is unspecified but deterministic. Newly</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 88 | <p class="firstline">Retrieves the next page of results.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#return_">return_(name, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Return a book to the library. Returns the book if it is returned to the</p> |
| 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
| 94 | <code class="details" id="borrow">borrow(name, x__xgafv=None)</code> |
| 95 | <pre>Borrow a book from the library. Returns the book if it is borrowed |
| 96 | successfully. Returns NOT_FOUND if the book does not exist in the library. |
| 97 | Returns quota exceeded error if the amount of books borrowed exceeds |
| 98 | allocation quota in any dimensions. |
| 99 | |
| 100 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 101 | name: string, Required. The name of the book to borrow. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 102 | x__xgafv: string, V1 error format. |
| 103 | Allowed values |
| 104 | 1 - v1 error format |
| 105 | 2 - v2 error format |
| 106 | |
| 107 | Returns: |
| 108 | An object of the form: |
| 109 | |
| 110 | { # A single book in the library. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 111 | "name": "A String", # The resource name of the book. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 112 | # Book names have the form `shelves/{shelf_id}/books/{book_id}`. |
| 113 | # The name is ignored when creating a book. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 114 | "title": "A String", # The title of the book. |
| 115 | "read": True or False, # Value indicating whether the book has been read. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 116 | "author": "A String", # The name of the book author. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 117 | }</pre> |
| 118 | </div> |
| 119 | |
| 120 | <div class="method"> |
| 121 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 122 | <pre>Gets a book. Returns NOT_FOUND if the book does not exist. |
| 123 | |
| 124 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 125 | name: string, Required. The name of the book to retrieve. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 126 | x__xgafv: string, V1 error format. |
| 127 | Allowed values |
| 128 | 1 - v1 error format |
| 129 | 2 - v2 error format |
| 130 | |
| 131 | Returns: |
| 132 | An object of the form: |
| 133 | |
| 134 | { # A single book in the library. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 135 | "name": "A String", # The resource name of the book. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 136 | # Book names have the form `shelves/{shelf_id}/books/{book_id}`. |
| 137 | # The name is ignored when creating a book. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 138 | "title": "A String", # The title of the book. |
| 139 | "read": True or False, # Value indicating whether the book has been read. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 140 | "author": "A String", # The name of the book author. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 141 | }</pre> |
| 142 | </div> |
| 143 | |
| 144 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 145 | <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 146 | <pre>Lists books in a shelf. The order is unspecified but deterministic. Newly |
| 147 | created books will not necessarily be added to the end of this list. |
| 148 | Returns NOT_FOUND if the shelf does not exist. |
| 149 | |
| 150 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 151 | parent: string, Required. The name of the shelf whose books we'd like to list. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 152 | pageToken: string, A token identifying a page of results the server should return. |
| 153 | Typically, this is the value of |
| 154 | ListBooksResponse.next_page_token. |
| 155 | returned from the previous call to `ListBooks` method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 156 | pageSize: integer, Requested page size. Server may return fewer books than requested. |
| 157 | If unspecified, server will pick an appropriate default. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 158 | x__xgafv: string, V1 error format. |
| 159 | Allowed values |
| 160 | 1 - v1 error format |
| 161 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 162 | |
| 163 | Returns: |
| 164 | An object of the form: |
| 165 | |
| 166 | { # Response message for LibraryAgent.ListBooks. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 167 | "books": [ # The list of books. |
| 168 | { # A single book in the library. |
| 169 | "name": "A String", # The resource name of the book. |
| 170 | # Book names have the form `shelves/{shelf_id}/books/{book_id}`. |
| 171 | # The name is ignored when creating a book. |
| 172 | "title": "A String", # The title of the book. |
| 173 | "read": True or False, # Value indicating whether the book has been read. |
| 174 | "author": "A String", # The name of the book author. |
| 175 | }, |
| 176 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 177 | "nextPageToken": "A String", # A token to retrieve next page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 178 | # Pass this value in the |
| 179 | # ListBooksRequest.page_token |
| 180 | # field in the subsequent call to `ListBooks` method to retrieve the next |
| 181 | # page of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 182 | }</pre> |
| 183 | </div> |
| 184 | |
| 185 | <div class="method"> |
| 186 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 187 | <pre>Retrieves the next page of results. |
| 188 | |
| 189 | Args: |
| 190 | previous_request: The request for the previous page. (required) |
| 191 | previous_response: The response from the request for the previous page. (required) |
| 192 | |
| 193 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 194 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 195 | page. Returns None if there are no more items in the collection. |
| 196 | </pre> |
| 197 | </div> |
| 198 | |
| 199 | <div class="method"> |
| 200 | <code class="details" id="return_">return_(name, x__xgafv=None)</code> |
| 201 | <pre>Return a book to the library. Returns the book if it is returned to the |
| 202 | library successfully. |
| 203 | Returns error if the book does not belong to the library |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 204 | or the users didn't borrow before. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 205 | |
| 206 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 207 | name: string, Required. The name of the book to return. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 208 | x__xgafv: string, V1 error format. |
| 209 | Allowed values |
| 210 | 1 - v1 error format |
| 211 | 2 - v2 error format |
| 212 | |
| 213 | Returns: |
| 214 | An object of the form: |
| 215 | |
| 216 | { # A single book in the library. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 217 | "name": "A String", # The resource name of the book. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 218 | # Book names have the form `shelves/{shelf_id}/books/{book_id}`. |
| 219 | # The name is ignored when creating a book. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 220 | "title": "A String", # The title of the book. |
| 221 | "read": True or False, # Value indicating whether the book has been read. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 222 | "author": "A String", # The name of the book author. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 223 | }</pre> |
| 224 | </div> |
| 225 | |
| 226 | </body></html> |