blob: 88bd29dddab47f29bbc2024d42fc3f8ac2d8bb99 [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -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">
Joe Gregorio52a5c532013-01-24 16:19:07 -050078 <code><a href="#copy">copy(tableId, copyPresentation=None)</a></code></p>
Joe Gregoriod67010d2012-11-05 08:57:06 -050079<p class="firstline">Copies a table.</p>
80<p class="toc_element">
Joe Gregorio075572b2012-07-09 16:53:09 -040081 <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">
Joe Gregoriod67010d2012-11-05 08:57:06 -050087 <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">
Joe Gregorio075572b2012-07-09 16:53:09 -040090 <code><a href="#insert">insert(body)</a></code></p>
91<p class="firstline">Creates a new table.</p>
92<p class="toc_element">
93 <code><a href="#list">list(pageToken=None, maxResults=None)</a></code></p>
94<p class="firstline">Retrieves a list of tables a user owns.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
99 <code><a href="#patch">patch(tableId, body, replaceViewDefinition=None)</a></code></p>
100<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>
101<p class="toc_element">
102 <code><a href="#update">update(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.</p>
104<h3>Method Details</h3>
105<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500106 <code class="details" id="copy">copy(tableId, copyPresentation=None)</code>
Joe Gregoriod67010d2012-11-05 08:57:06 -0500107 <pre>Copies a table.
108
109Args:
110 tableId: string, ID of the table that is being copied. (required)
Joe Gregorio52a5c532013-01-24 16:19:07 -0500111 copyPresentation: boolean, Whether to also copy tabs, styles, and templates. Default is false.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500112
113Returns:
114 An object of the form:
115
116 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
117 "kind": "fusiontables#table", # Type name: a template for an individual table.
118 "attribution": "A String", # Optional attribution assigned to the table.
119 "description": "A String", # Optional description assigned to the table.
120 "isExportable": True or False, # Variable for whether table is exportable.
121 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
122 "A String",
123 ],
124 "attributionLink": "A String", # Optional link for attribution.
125 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
126 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
127 "columns": [ # Columns in the table.
128 { # Specifies the id, name and type of a column in a table.
129 "kind": "fusiontables#column", # Type name: a template for an individual column.
130 "type": "A String", # Required type of the column.
131 "columnId": 42, # Identifier for the column.
132 "name": "A String", # Required name of the column.
133 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
134 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
135 "columnId": 42, # The id of the column in the base table from which this column is derived.
136 },
137 },
138 ],
139 "name": "A String", # Name assigned to a table.
140 }</pre>
141</div>
142
143<div class="method">
Joe Gregorio075572b2012-07-09 16:53:09 -0400144 <code class="details" id="delete">delete(tableId)</code>
145 <pre>Deletes a table.
146
147Args:
Joe Gregoriod67010d2012-11-05 08:57:06 -0500148 tableId: string, ID of the table that is being deleted. (required)
Joe Gregorio075572b2012-07-09 16:53:09 -0400149</pre>
150</div>
151
152<div class="method">
153 <code class="details" id="get">get(tableId)</code>
154 <pre>Retrieves a specific table by its id.
155
156Args:
157 tableId: string, Identifier(ID) for the table being requested. (required)
158
159Returns:
160 An object of the form:
161
162 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
163 "kind": "fusiontables#table", # Type name: a template for an individual table.
164 "attribution": "A String", # Optional attribution assigned to the table.
165 "description": "A String", # Optional description assigned to the table.
166 "isExportable": True or False, # Variable for whether table is exportable.
167 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
168 "A String",
169 ],
170 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400171 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400172 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
173 "columns": [ # Columns in the table.
174 { # Specifies the id, name and type of a column in a table.
175 "kind": "fusiontables#column", # Type name: a template for an individual column.
176 "type": "A String", # Required type of the column.
177 "columnId": 42, # Identifier for the column.
178 "name": "A String", # Required name of the column.
179 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
180 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
181 "columnId": 42, # The id of the column in the base table from which this column is derived.
182 },
183 },
184 ],
185 "name": "A String", # Name assigned to a table.
186 }</pre>
187</div>
188
189<div class="method">
Joe Gregoriod67010d2012-11-05 08:57:06 -0500190 <code class="details" id="importRows">importRows(tableId, media_body=None, startLine=None, isStrict=None, encoding=None, delimiter=None, endLine=None)</code>
191 <pre>Import more rows into a table.
192
193Args:
194 tableId: string, The table into which new rows are being imported. (required)
195 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
196 startLine: integer, The index of the first line from which to start importing, inclusive. Default is 0.
197 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.
198 encoding: string, The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are unsure of the encoding.
199 delimiter: string, The delimiter used to separate cell values. This can only consist of a single character. Default is ','.
200 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.
201
202Returns:
203 An object of the form:
204
205 { # Represents an import request.
206 "numRowsReceived": "A String", # The number of rows received from the import request.
207 "kind": "fusiontables#import", # Type name: a template for an import request.
208 }</pre>
209</div>
210
211<div class="method">
Joe Gregorio075572b2012-07-09 16:53:09 -0400212 <code class="details" id="insert">insert(body)</code>
213 <pre>Creates a new table.
214
215Args:
216 body: object, The request body. (required)
217 The object takes the form of:
218
219{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
220 "kind": "fusiontables#table", # Type name: a template for an individual table.
221 "attribution": "A String", # Optional attribution assigned to the table.
222 "description": "A String", # Optional description assigned to the table.
223 "isExportable": True or False, # Variable for whether table is exportable.
224 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
225 "A String",
226 ],
227 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400228 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400229 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
230 "columns": [ # Columns in the table.
231 { # Specifies the id, name and type of a column in a table.
232 "kind": "fusiontables#column", # Type name: a template for an individual column.
233 "type": "A String", # Required type of the column.
234 "columnId": 42, # Identifier for the column.
235 "name": "A String", # Required name of the column.
236 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
237 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
238 "columnId": 42, # The id of the column in the base table from which this column is derived.
239 },
240 },
241 ],
242 "name": "A String", # Name assigned to a table.
243 }
244
245
246Returns:
247 An object of the form:
248
249 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
250 "kind": "fusiontables#table", # Type name: a template for an individual table.
251 "attribution": "A String", # Optional attribution assigned to the table.
252 "description": "A String", # Optional description assigned to the table.
253 "isExportable": True or False, # Variable for whether table is exportable.
254 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
255 "A String",
256 ],
257 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400258 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400259 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
260 "columns": [ # Columns in the table.
261 { # Specifies the id, name and type of a column in a table.
262 "kind": "fusiontables#column", # Type name: a template for an individual column.
263 "type": "A String", # Required type of the column.
264 "columnId": 42, # Identifier for the column.
265 "name": "A String", # Required name of the column.
266 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
267 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
268 "columnId": 42, # The id of the column in the base table from which this column is derived.
269 },
270 },
271 ],
272 "name": "A String", # Name assigned to a table.
273 }</pre>
274</div>
275
276<div class="method">
277 <code class="details" id="list">list(pageToken=None, maxResults=None)</code>
278 <pre>Retrieves a list of tables a user owns.
279
280Args:
281 pageToken: string, Continuation token specifying which result page to return. Optional.
282 maxResults: integer, Maximum number of styles to return. Optional. Default is 5.
283
284Returns:
285 An object of the form:
286
287 { # Represents a list of tables.
288 "nextPageToken": "A String", # Token used to access the next page of this result. No token is displayed if there are no more tokens left.
289 "items": [ # List of all requested tables.
290 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
291 "kind": "fusiontables#table", # Type name: a template for an individual table.
292 "attribution": "A String", # Optional attribution assigned to the table.
293 "description": "A String", # Optional description assigned to the table.
294 "isExportable": True or False, # Variable for whether table is exportable.
295 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
296 "A String",
297 ],
298 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400299 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400300 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
301 "columns": [ # Columns in the table.
302 { # Specifies the id, name and type of a column in a table.
303 "kind": "fusiontables#column", # Type name: a template for an individual column.
304 "type": "A String", # Required type of the column.
305 "columnId": 42, # Identifier for the column.
306 "name": "A String", # Required name of the column.
307 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
308 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
309 "columnId": 42, # The id of the column in the base table from which this column is derived.
310 },
311 },
312 ],
313 "name": "A String", # Name assigned to a table.
314 },
315 ],
316 "kind": "fusiontables#tableList", # Type name: a list of all tables.
317 }</pre>
318</div>
319
320<div class="method">
321 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
322 <pre>Retrieves the next page of results.
323
324Args:
325 previous_request: The request for the previous page. (required)
326 previous_response: The response from the request for the previous page. (required)
327
328Returns:
329 A request object that you can call 'execute()' on to request the next
330 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500331 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -0400332</div>
333
334<div class="method">
335 <code class="details" id="patch">patch(tableId, body, replaceViewDefinition=None)</code>
336 <pre>Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. This method supports patch semantics.
337
338Args:
Joe Gregoriod67010d2012-11-05 08:57:06 -0500339 tableId: string, ID of the table that is being updated. (required)
Joe Gregorio075572b2012-07-09 16:53:09 -0400340 body: object, The request body. (required)
341 The object takes the form of:
342
343{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
344 "kind": "fusiontables#table", # Type name: a template for an individual table.
345 "attribution": "A String", # Optional attribution assigned to the table.
346 "description": "A String", # Optional description assigned to the table.
347 "isExportable": True or False, # Variable for whether table is exportable.
348 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
349 "A String",
350 ],
351 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400352 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400353 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
354 "columns": [ # Columns in the table.
355 { # Specifies the id, name and type of a column in a table.
356 "kind": "fusiontables#column", # Type name: a template for an individual column.
357 "type": "A String", # Required type of the column.
358 "columnId": 42, # Identifier for the column.
359 "name": "A String", # Required name of the column.
360 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
361 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
362 "columnId": 42, # The id of the column in the base table from which this column is derived.
363 },
364 },
365 ],
366 "name": "A String", # Name assigned to a table.
367 }
368
369 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.
370
371Returns:
372 An object of the form:
373
374 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
375 "kind": "fusiontables#table", # Type name: a template for an individual table.
376 "attribution": "A String", # Optional attribution assigned to the table.
377 "description": "A String", # Optional description assigned to the table.
378 "isExportable": True or False, # Variable for whether table is exportable.
379 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
380 "A String",
381 ],
382 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400383 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400384 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
385 "columns": [ # Columns in the table.
386 { # Specifies the id, name and type of a column in a table.
387 "kind": "fusiontables#column", # Type name: a template for an individual column.
388 "type": "A String", # Required type of the column.
389 "columnId": 42, # Identifier for the column.
390 "name": "A String", # Required name of the column.
391 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
392 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
393 "columnId": 42, # The id of the column in the base table from which this column is derived.
394 },
395 },
396 ],
397 "name": "A String", # Name assigned to a table.
398 }</pre>
399</div>
400
401<div class="method">
402 <code class="details" id="update">update(tableId, body, replaceViewDefinition=None)</code>
403 <pre>Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated.
404
405Args:
Joe Gregoriod67010d2012-11-05 08:57:06 -0500406 tableId: string, ID of the table that is being updated. (required)
Joe Gregorio075572b2012-07-09 16:53:09 -0400407 body: object, The request body. (required)
408 The object takes the form of:
409
410{ # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
411 "kind": "fusiontables#table", # Type name: a template for an individual table.
412 "attribution": "A String", # Optional attribution assigned to the table.
413 "description": "A String", # Optional description assigned to the table.
414 "isExportable": True or False, # Variable for whether table is exportable.
415 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
416 "A String",
417 ],
418 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400419 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400420 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
421 "columns": [ # Columns in the table.
422 { # Specifies the id, name and type of a column in a table.
423 "kind": "fusiontables#column", # Type name: a template for an individual column.
424 "type": "A String", # Required type of the column.
425 "columnId": 42, # Identifier for the column.
426 "name": "A String", # Required name of the column.
427 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
428 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
429 "columnId": 42, # The id of the column in the base table from which this column is derived.
430 },
431 },
432 ],
433 "name": "A String", # Name assigned to a table.
434 }
435
436 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.
437
438Returns:
439 An object of the form:
440
441 { # Represents a table. Specifies the name, whether it is exportable, description, attribution, and attribution link.
442 "kind": "fusiontables#table", # Type name: a template for an individual table.
443 "attribution": "A String", # Optional attribution assigned to the table.
444 "description": "A String", # Optional description assigned to the table.
445 "isExportable": True or False, # Variable for whether table is exportable.
446 "baseTableIds": [ # Optional base table identifier if this table is a view or merged table.
447 "A String",
448 ],
449 "attributionLink": "A String", # Optional link for attribution.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400450 "sql": "A String", # Optional sql that encodes the table definition for derived tables.
Joe Gregorio075572b2012-07-09 16:53:09 -0400451 "tableId": "A String", # Encrypted unique alphanumeric identifier for the table.
452 "columns": [ # Columns in the table.
453 { # Specifies the id, name and type of a column in a table.
454 "kind": "fusiontables#column", # Type name: a template for an individual column.
455 "type": "A String", # Required type of the column.
456 "columnId": 42, # Identifier for the column.
457 "name": "A String", # Required name of the column.
458 "baseColumn": { # Optional identifier of the base column. If present, this column is derived from the specified base column.
459 "tableIndex": 42, # Offset to the entry in the list of base tables in the table definition.
460 "columnId": 42, # The id of the column in the base table from which this column is derived.
461 },
462 },
463 ],
464 "name": "A String", # Name assigned to a table.
465 }</pre>
466</div>
467
468</body></html>