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