Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: class Resource</title> |
| 4 | </head><body bgcolor="#f0f0f8"> |
| 5 | <p> |
| 6 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 7 | <tr bgcolor="#ffc8d8"> |
| 8 | <td colspan=3 valign=bottom> <br> |
| 9 | <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 10 | |
| 11 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 12 | <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| 13 | <tr><td> </td> |
| 14 | <td width="100%">Methods defined here:<br> |
| 15 | <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| 16 | |
| 17 | <dl><dt><a name="Resource-delete"><strong>delete</strong></a> = method(self, **kwargs)</dt><dd><tt>Deletes a location from the user's location history.<br> |
| 18 | <br> |
| 19 | Args:<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 20 | locationId: string, Timestamp of the location to delete (ms since epoch). (required)</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 21 | |
| 22 | <dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Reads a location from the user's location history.<br> |
| 23 | <br> |
| 24 | Args:<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 25 | locationId: string, Timestamp of the location to read (ms since epoch). (required)<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 26 | granularity: string, Granularity of the location to return.<br> |
| 27 | <br> |
| 28 | Returns:<br> |
| 29 | An object of the form<br> |
| 30 | <br> |
| 31 | { # A Location resource identifies a user's position at a particular time. It may include metadata about the user's position, such as a venue if the location was recorded at the time of a check-in.<br> |
| 32 | "kind": "latitude#location", # Kind of this item.<br> |
| 33 | "altitude": "", # Altitude of the location, in meters. Optional.<br> |
| 34 | "longitude": "", # Longitude of the location, in decimal degrees.<br> |
| 35 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.<br> |
| 36 | "latitude": "", # Latitude of the location, in decimal degrees.<br> |
| 37 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.<br> |
| 38 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.<br> |
| 39 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.<br> |
| 40 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.<br> |
| 41 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.<br> |
| 42 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 43 | |
| 44 | <dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts or updates a location in the user's location history.<br> |
| 45 | <br> |
| 46 | Args:<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 47 | body: object, The request body. (required)<br> |
| 48 | The object takes the form of:<br> |
| 49 | <br> |
| 50 | { # A Location resource identifies a user's position at a particular time. It may include metadata about the user's position, such as a venue if the location was recorded at the time of a check-in.<br> |
| 51 | "kind": "latitude#location", # Kind of this item.<br> |
| 52 | "altitude": "", # Altitude of the location, in meters. Optional.<br> |
| 53 | "longitude": "", # Longitude of the location, in decimal degrees.<br> |
| 54 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.<br> |
| 55 | "latitude": "", # Latitude of the location, in decimal degrees.<br> |
| 56 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.<br> |
| 57 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.<br> |
| 58 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.<br> |
| 59 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.<br> |
| 60 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.<br> |
| 61 | }<br> |
| 62 | <br> |
| 63 | <br> |
| 64 | Returns:<br> |
| 65 | An object of the form<br> |
| 66 | <br> |
| 67 | { # A Location resource identifies a user's position at a particular time. It may include metadata about the user's position, such as a venue if the location was recorded at the time of a check-in.<br> |
| 68 | "kind": "latitude#location", # Kind of this item.<br> |
| 69 | "altitude": "", # Altitude of the location, in meters. Optional.<br> |
| 70 | "longitude": "", # Longitude of the location, in decimal degrees.<br> |
| 71 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.<br> |
| 72 | "latitude": "", # Latitude of the location, in decimal degrees.<br> |
| 73 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.<br> |
| 74 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.<br> |
| 75 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.<br> |
| 76 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.<br> |
| 77 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.<br> |
| 78 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 79 | |
| 80 | <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Lists the user's location history.<br> |
| 81 | <br> |
| 82 | Args:<br> |
Joe Gregorio | ad258e2 | 2011-02-22 22:53:30 -0500 | [diff] [blame] | 83 | min_time: string, Minimum timestamp of locations to return (ms since epoch).<br> |
| 84 | max_results: string, Maximum number of locations to return.<br> |
| 85 | max_time: string, Maximum timestamp of locations to return (ms since epoch).<br> |
Joe Gregorio | b417caf | 2011-12-08 12:04:24 -0500 | [diff] [blame] | 86 | granularity: string, Granularity of the requested locations.<br> |
| 87 | <br> |
| 88 | Returns:<br> |
| 89 | An object of the form<br> |
| 90 | <br> |
| 91 | {<br> |
| 92 | "items": [<br> |
| 93 | { # A Location resource identifies a user's position at a particular time. It may include metadata about the user's position, such as a venue if the location was recorded at the time of a check-in.<br> |
| 94 | "kind": "latitude#location", # Kind of this item.<br> |
| 95 | "altitude": "", # Altitude of the location, in meters. Optional.<br> |
| 96 | "longitude": "", # Longitude of the location, in decimal degrees.<br> |
| 97 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.<br> |
| 98 | "latitude": "", # Latitude of the location, in decimal degrees.<br> |
| 99 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.<br> |
| 100 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.<br> |
| 101 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.<br> |
| 102 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.<br> |
| 103 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.<br> |
| 104 | },<br> |
| 105 | ],<br> |
| 106 | "kind": "latitude#locationFeed",<br> |
| 107 | }</tt></dd></dl> |
Joe Gregorio | afc45f2 | 2011-02-20 16:11:28 -0500 | [diff] [blame] | 108 | |
| 109 | <hr> |
| 110 | Data descriptors defined here:<br> |
| 111 | <dl><dt><strong>__dict__</strong></dt> |
| 112 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 113 | </dl> |
| 114 | <dl><dt><strong>__weakref__</strong></dt> |
| 115 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 116 | </dl> |
| 117 | </td></tr></table> |
| 118 | </body></html> |