blob: 3d6a234abbe23aa26acec6abb5c28e4930f2761d [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<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
96successfully. Returns NOT_FOUND if the book does not exist in the library.
97Returns quota exceeded error if the amount of books borrowed exceeds
98allocation quota in any dimensions.
99
100Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 name: string, Required. The name of the book to borrow. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 x__xgafv: string, V1 error format.
103 Allowed values
104 1 - v1 error format
105 2 - v2 error format
106
107Returns:
108 An object of the form:
109
110 { # A single book in the library.
111 "read": True or False, # Value indicating whether the book has been read.
112 "title": "A String", # The title of the book.
113 "name": "A String", # The resource name of the book.
114 # Book names have the form `shelves/{shelf_id}/books/{book_id}`.
115 # The name is ignored when creating a book.
116 "author": "A String", # The name of the book author.
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
124Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 name: string, Required. The name of the book to retrieve. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 x__xgafv: string, V1 error format.
127 Allowed values
128 1 - v1 error format
129 2 - v2 error format
130
131Returns:
132 An object of the form:
133
134 { # A single book in the library.
135 "read": True or False, # Value indicating whether the book has been read.
136 "title": "A String", # The title of the book.
137 "name": "A String", # The resource name of the book.
138 # Book names have the form `shelves/{shelf_id}/books/{book_id}`.
139 # The name is ignored when creating a book.
140 "author": "A String", # The name of the book author.
141 }</pre>
142</div>
143
144<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 <pre>Lists books in a shelf. The order is unspecified but deterministic. Newly
147created books will not necessarily be added to the end of this list.
148Returns NOT_FOUND if the shelf does not exist.
149
150Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 parent: string, Required. The name of the shelf whose books we'd like to list. (required)
152 pageSize: integer, Requested page size. Server may return fewer books than requested.
153If unspecified, server will pick an appropriate default.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 pageToken: string, A token identifying a page of results the server should return.
155Typically, this is the value of
156ListBooksResponse.next_page_token.
157returned from the previous call to `ListBooks` method.
158 x__xgafv: string, V1 error format.
159 Allowed values
160 1 - v1 error format
161 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162
163Returns:
164 An object of the form:
165
166 { # Response message for LibraryAgent.ListBooks.
167 "nextPageToken": "A String", # A token to retrieve next page of results.
168 # Pass this value in the
169 # ListBooksRequest.page_token
170 # field in the subsequent call to `ListBooks` method to retrieve the next
171 # page of results.
172 "books": [ # The list of books.
173 { # A single book in the library.
174 "read": True or False, # Value indicating whether the book has been read.
175 "title": "A String", # The title of the book.
176 "name": "A String", # The resource name of the book.
177 # Book names have the form `shelves/{shelf_id}/books/{book_id}`.
178 # The name is ignored when creating a book.
179 "author": "A String", # The name of the book author.
180 },
181 ],
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
189Args:
190 previous_request: The request for the previous page. (required)
191 previous_response: The response from the request for the previous page. (required)
192
193Returns:
194 A request object that you can call 'execute()' on to request the next
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
202library successfully.
203Returns error if the book does not belong to the library
204or the users didn't borrow before.
205
206Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 name: string, Required. The name of the book to return. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 x__xgafv: string, V1 error format.
209 Allowed values
210 1 - v1 error format
211 2 - v2 error format
212
213Returns:
214 An object of the form:
215
216 { # A single book in the library.
217 "read": True or False, # Value indicating whether the book has been read.
218 "title": "A String", # The title of the book.
219 "name": "A String", # The resource name of the book.
220 # Book names have the form `shelves/{shelf_id}/books/{book_id}`.
221 # The name is ignored when creating a book.
222 "author": "A String", # The name of the book author.
223 }</pre>
224</div>
225
226</body></html>