blob: 01570639b94568b45c49a08d1dfe0ad3d20a1aab [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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="fusiontables_v1.html">Fusion Tables API</a> . <a href="fusiontables_v1.table.html">table</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#copy">copy(tableId, copyPresentation=None)</a></code></p>
79<p class="firstline">Copies a table.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(tableId)</a></code></p>
82<p class="firstline">Deletes a table.</p>
83<p class="toc_element">
84 <code><a href="#get">get(tableId)</a></code></p>
85<p class="firstline">Retrieves a specific table by its id.</p>
86<p class="toc_element">
87 <code><a href="#importRows">importRows(tableId, media_body=None, startLine=None, isStrict=None, encoding=None, delimiter=None, endLine=None)</a></code></p>
88<p class="firstline">Import more rows into a table.</p>
89<p class="toc_element">
90 <code><a href="#importTable">importTable(name, media_body=None, encoding=None, delimiter=None)</a></code></p>
91<p class="firstline">Import a new table.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(body)</a></code></p>
94<p class="firstline">Creates a new table.</p>
95<p class="toc_element">
96 <code><a href="#list">list(pageToken=None, maxResults=None)</a></code></p>
97<p class="firstline">Retrieves a list of tables a user owns.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(tableId, body, replaceViewDefinition=None)</a></code></p>
103<p class="firstline">Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics.</p>
104<p class="toc_element">
105 <code><a href="#update">update(tableId, body, replaceViewDefinition=None)</a></code></p>
106<p class="firstline">Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated.</p>
107<h3>Method Details</h3>
108<div class="method">
109 <code class="details" id="copy">copy(tableId, copyPresentation=None)</code>
110 <pre>Copies a table.
111
112Args:
113 tableId: string, ID of the table that is being copied. (required)
114 copyPresentation: boolean, Whether to also copy tabs, styles, and templates. Default is false.
115
116Returns:
117 An object of the form:
118
119 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
120 "kind": "fusiontables#table", # Type name: a template for an individual table.
121 "attribution": "A String", # Optional attribution assigned to the table.
122 "description": "A String", # Optional description assigned to the table.
123 "isExportable": True or False, # Variable for whether table is exportable.
124 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
125 "A String",
126 ],
127 "attributionLink": "A String", # Optional link for attribution.
128 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
129 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
130 "columns": [ # Columns in the table.
131 { # Specifies the id, name and type of a column in a table.
132 "kind": "fusiontables#column", # Type name: a template for an individual column.
133 "type": "A String", # Required type of the column.
134 "columnId": 42, # Identifier for the column.
135 "name": "A String", # Required name of the column.
136 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
137 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
138 "columnId": 42, # The id of the column in the base table from which this column is derived.
139 },
140 },
141 ],
142 "name": "A String", # Name assigned to a table.
143 }</pre>
144</div>
145
146<div class="method">
147 <code class="details" id="delete">delete(tableId)</code>
148 <pre>Deletes a table.
149
150Args:
151 tableId: string, ID of the table that is being deleted. (required)
152</pre>
153</div>
154
155<div class="method">
156 <code class="details" id="get">get(tableId)</code>
157 <pre>Retrieves a specific table by its id.
158
159Args:
160 tableId: string, Identifier(ID) for the table being requested. (required)
161
162Returns:
163 An object of the form:
164
165 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
166 "kind": "fusiontables#table", # Type name: a template for an individual table.
167 "attribution": "A String", # Optional attribution assigned to the table.
168 "description": "A String", # Optional description assigned to the table.
169 "isExportable": True or False, # Variable for whether table is exportable.
170 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
171 "A String",
172 ],
173 "attributionLink": "A String", # Optional link for attribution.
174 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
175 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
176 "columns": [ # Columns in the table.
177 { # Specifies the id, name and type of a column in a table.
178 "kind": "fusiontables#column", # Type name: a template for an individual column.
179 "type": "A String", # Required type of the column.
180 "columnId": 42, # Identifier for the column.
181 "name": "A String", # Required name of the column.
182 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
183 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
184 "columnId": 42, # The id of the column in the base table from which this column is derived.
185 },
186 },
187 ],
188 "name": "A String", # Name assigned to a table.
189 }</pre>
190</div>
191
192<div class="method">
193 <code class="details" id="importRows">importRows(tableId, media_body=None, startLine=None, isStrict=None, encoding=None, delimiter=None, endLine=None)</code>
194 <pre>Import more rows into a table.
195
196Args:
197 tableId: string, The table into which new rows are being imported. (required)
198 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
199 startLine: integer, The index of the first line from which to start importing, inclusive. Default is 0.
200 isStrict: boolean, Whether the CSV must have the same number of values for each row. If false, rows with fewer values will be padded with empty values. Default is true.
201 encoding: string, The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.
202 delimiter: string, The delimiter used to separate cell values. This can only consist of a single character. Default is ','.
203 endLine: integer, The index of the last line from which to start importing, exclusive. Thus, the number of imported lines is endLine - startLine. If this parameter is not provided, the file will be imported until the last line of the file. If endLine is negative, then the imported content will exclude the last endLine lines. That is, if endline is negative, no line will be imported whose index is greater than N + endLine where N is the number of lines in the file, and the number of imported lines will be N + endLine - startLine.
204
205Returns:
206 An object of the form:
207
208 { # Represents an import request.
209 "numRowsReceived": "A String", # The number of rows received from the import request.
210 "kind": "fusiontables#import", # Type name: a template for an import request.
211 }</pre>
212</div>
213
214<div class="method">
215 <code class="details" id="importTable">importTable(name, media_body=None, encoding=None, delimiter=None)</code>
216 <pre>Import a new table.
217
218Args:
219 name: string, The name to be assigned to the new table. (required)
220 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
221 encoding: string, The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.
222 delimiter: string, The delimiter used to separate cell values. This can only consist of a single character. Default is ','.
223
224Returns:
225 An object of the form:
226
227 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
228 "kind": "fusiontables#table", # Type name: a template for an individual table.
229 "attribution": "A String", # Optional attribution assigned to the table.
230 "description": "A String", # Optional description assigned to the table.
231 "isExportable": True or False, # Variable for whether table is exportable.
232 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
233 "A String",
234 ],
235 "attributionLink": "A String", # Optional link for attribution.
236 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
237 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
238 "columns": [ # Columns in the table.
239 { # Specifies the id, name and type of a column in a table.
240 "kind": "fusiontables#column", # Type name: a template for an individual column.
241 "type": "A String", # Required type of the column.
242 "columnId": 42, # Identifier for the column.
243 "name": "A String", # Required name of the column.
244 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
245 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
246 "columnId": 42, # The id of the column in the base table from which this column is derived.
247 },
248 },
249 ],
250 "name": "A String", # Name assigned to a table.
251 }</pre>
252</div>
253
254<div class="method">
255 <code class="details" id="insert">insert(body)</code>
256 <pre>Creates a new table.
257
258Args:
259 body: object, The request body. (required)
260 The object takes the form of:
261
262{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
263 "kind": "fusiontables#table", # Type name: a template for an individual table.
264 "attribution": "A String", # Optional attribution assigned to the table.
265 "description": "A String", # Optional description assigned to the table.
266 "isExportable": True or False, # Variable for whether table is exportable.
267 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
268 "A String",
269 ],
270 "attributionLink": "A String", # Optional link for attribution.
271 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
272 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
273 "columns": [ # Columns in the table.
274 { # Specifies the id, name and type of a column in a table.
275 "kind": "fusiontables#column", # Type name: a template for an individual column.
276 "type": "A String", # Required type of the column.
277 "columnId": 42, # Identifier for the column.
278 "name": "A String", # Required name of the column.
279 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
280 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
281 "columnId": 42, # The id of the column in the base table from which this column is derived.
282 },
283 },
284 ],
285 "name": "A String", # Name assigned to a table.
286 }
287
288
289Returns:
290 An object of the form:
291
292 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
293 "kind": "fusiontables#table", # Type name: a template for an individual table.
294 "attribution": "A String", # Optional attribution assigned to the table.
295 "description": "A String", # Optional description assigned to the table.
296 "isExportable": True or False, # Variable for whether table is exportable.
297 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
298 "A String",
299 ],
300 "attributionLink": "A String", # Optional link for attribution.
301 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
302 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
303 "columns": [ # Columns in the table.
304 { # Specifies the id, name and type of a column in a table.
305 "kind": "fusiontables#column", # Type name: a template for an individual column.
306 "type": "A String", # Required type of the column.
307 "columnId": 42, # Identifier for the column.
308 "name": "A String", # Required name of the column.
309 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
310 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
311 "columnId": 42, # The id of the column in the base table from which this column is derived.
312 },
313 },
314 ],
315 "name": "A String", # Name assigned to a table.
316 }</pre>
317</div>
318
319<div class="method">
320 <code class="details" id="list">list(pageToken=None, maxResults=None)</code>
321 <pre>Retrieves a list of tables a user owns.
322
323Args:
324 pageToken: string, Continuation token specifying which result page to return. Optional.
325 maxResults: integer, Maximum number of styles to return. Optional. Default is 5.
326
327Returns:
328 An object of the form:
329
330 { # Represents a list of tables.
331 "nextPageToken": "A String", # Token used to access the next page of this result. No token is displayed if there are no more tokens left.
332 "items": [ # List of all requested tables.
333 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
334 "kind": "fusiontables#table", # Type name: a template for an individual table.
335 "attribution": "A String", # Optional attribution assigned to the table.
336 "description": "A String", # Optional description assigned to the table.
337 "isExportable": True or False, # Variable for whether table is exportable.
338 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
339 "A String",
340 ],
341 "attributionLink": "A String", # Optional link for attribution.
342 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
343 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
344 "columns": [ # Columns in the table.
345 { # Specifies the id, name and type of a column in a table.
346 "kind": "fusiontables#column", # Type name: a template for an individual column.
347 "type": "A String", # Required type of the column.
348 "columnId": 42, # Identifier for the column.
349 "name": "A String", # Required name of the column.
350 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
351 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
352 "columnId": 42, # The id of the column in the base table from which this column is derived.
353 },
354 },
355 ],
356 "name": "A String", # Name assigned to a table.
357 },
358 ],
359 "kind": "fusiontables#tableList", # Type name: a list of all tables.
360 }</pre>
361</div>
362
363<div class="method">
364 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
365 <pre>Retrieves the next page of results.
366
367Args:
368 previous_request: The request for the previous page. (required)
369 previous_response: The response from the request for the previous page. (required)
370
371Returns:
372 A request object that you can call 'execute()' on to request the next
373 page. Returns None if there are no more items in the collection.
374 </pre>
375</div>
376
377<div class="method">
378 <code class="details" id="patch">patch(tableId, body, replaceViewDefinition=None)</code>
379 <pre>Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics.
380
381Args:
382 tableId: string, ID of the table that is being updated. (required)
383 body: object, The request body. (required)
384 The object takes the form of:
385
386{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
387 "kind": "fusiontables#table", # Type name: a template for an individual table.
388 "attribution": "A String", # Optional attribution assigned to the table.
389 "description": "A String", # Optional description assigned to the table.
390 "isExportable": True or False, # Variable for whether table is exportable.
391 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
392 "A String",
393 ],
394 "attributionLink": "A String", # Optional link for attribution.
395 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
396 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
397 "columns": [ # Columns in the table.
398 { # Specifies the id, name and type of a column in a table.
399 "kind": "fusiontables#column", # Type name: a template for an individual column.
400 "type": "A String", # Required type of the column.
401 "columnId": 42, # Identifier for the column.
402 "name": "A String", # Required name of the column.
403 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
404 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
405 "columnId": 42, # The id of the column in the base table from which this column is derived.
406 },
407 },
408 ],
409 "name": "A String", # Name assigned to a table.
410 }
411
412 replaceViewDefinition: boolean, Should the view definition also be updated? The specified view definition replaces the existing one. Only a view can be updated with a new definition.
413
414Returns:
415 An object of the form:
416
417 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
418 "kind": "fusiontables#table", # Type name: a template for an individual table.
419 "attribution": "A String", # Optional attribution assigned to the table.
420 "description": "A String", # Optional description assigned to the table.
421 "isExportable": True or False, # Variable for whether table is exportable.
422 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
423 "A String",
424 ],
425 "attributionLink": "A String", # Optional link for attribution.
426 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
427 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
428 "columns": [ # Columns in the table.
429 { # Specifies the id, name and type of a column in a table.
430 "kind": "fusiontables#column", # Type name: a template for an individual column.
431 "type": "A String", # Required type of the column.
432 "columnId": 42, # Identifier for the column.
433 "name": "A String", # Required name of the column.
434 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
435 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
436 "columnId": 42, # The id of the column in the base table from which this column is derived.
437 },
438 },
439 ],
440 "name": "A String", # Name assigned to a table.
441 }</pre>
442</div>
443
444<div class="method">
445 <code class="details" id="update">update(tableId, body, replaceViewDefinition=None)</code>
446 <pre>Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated.
447
448Args:
449 tableId: string, ID of the table that is being updated. (required)
450 body: object, The request body. (required)
451 The object takes the form of:
452
453{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
454 "kind": "fusiontables#table", # Type name: a template for an individual table.
455 "attribution": "A String", # Optional attribution assigned to the table.
456 "description": "A String", # Optional description assigned to the table.
457 "isExportable": True or False, # Variable for whether table is exportable.
458 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
459 "A String",
460 ],
461 "attributionLink": "A String", # Optional link for attribution.
462 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
463 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
464 "columns": [ # Columns in the table.
465 { # Specifies the id, name and type of a column in a table.
466 "kind": "fusiontables#column", # Type name: a template for an individual column.
467 "type": "A String", # Required type of the column.
468 "columnId": 42, # Identifier for the column.
469 "name": "A String", # Required name of the column.
470 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
471 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
472 "columnId": 42, # The id of the column in the base table from which this column is derived.
473 },
474 },
475 ],
476 "name": "A String", # Name assigned to a table.
477 }
478
479 replaceViewDefinition: boolean, Should the view definition also be updated? The specified view definition replaces the existing one. Only a view can be updated with a new definition.
480
481Returns:
482 An object of the form:
483
484 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
485 "kind": "fusiontables#table", # Type name: a template for an individual table.
486 "attribution": "A String", # Optional attribution assigned to the table.
487 "description": "A String", # Optional description assigned to the table.
488 "isExportable": True or False, # Variable for whether table is exportable.
489 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
490 "A String",
491 ],
492 "attributionLink": "A String", # Optional link for attribution.
493 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
494 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
495 "columns": [ # Columns in the table.
496 { # Specifies the id, name and type of a column in a table.
497 "kind": "fusiontables#column", # Type name: a template for an individual column.
498 "type": "A String", # Required type of the column.
499 "columnId": 42, # Identifier for the column.
500 "name": "A String", # Required name of the column.
501 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
502 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
503 "columnId": 42, # The id of the column in the base table from which this column is derived.
504 },
505 },
506 ],
507 "name": "A String", # Name assigned to a table.
508 }</pre>
509</div>
510
511</body></html>