Joe Gregorio | 075572b | 2012-07-09 16:53:09 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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="latitude_v1.html">Google Latitude API</a> . <a href="latitude_v1.location.html">location</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#delete">delete(locationId)</a></code></p> |
| 79 | <p class="firstline">Deletes a location from the user's location history.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#get">get(locationId, granularity=None)</a></code></p> |
| 82 | <p class="firstline">Reads a location from the user's location history.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#insert">insert(body)</a></code></p> |
| 85 | <p class="firstline">Inserts or updates a location in the user's location history.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(min_time=None, max_results=None, granularity=None, max_time=None)</a></code></p> |
| 88 | <p class="firstline">Lists the user's location history.</p> |
| 89 | <h3>Method Details</h3> |
| 90 | <div class="method"> |
| 91 | <code class="details" id="delete">delete(locationId)</code> |
| 92 | <pre>Deletes a location from the user's location history. |
| 93 | |
| 94 | Args: |
| 95 | locationId: string, Timestamp of the location to delete (ms since epoch). (required) |
| 96 | </pre> |
| 97 | </div> |
| 98 | |
| 99 | <div class="method"> |
| 100 | <code class="details" id="get">get(locationId, granularity=None)</code> |
| 101 | <pre>Reads a location from the user's location history. |
| 102 | |
| 103 | Args: |
| 104 | locationId: string, Timestamp of the location to read (ms since epoch). (required) |
| 105 | granularity: string, Granularity of the location to return. |
| 106 | Allowed values |
| 107 | best - Request best available granularity. |
| 108 | city - Request city-level granularty. |
| 109 | |
| 110 | Returns: |
| 111 | An object of the form: |
| 112 | |
| 113 | { # 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. |
| 114 | "kind": "latitude#location", # Kind of this item. |
| 115 | "altitude": "", # Altitude of the location, in meters. Optional. |
| 116 | "longitude": "", # Longitude of the location, in decimal degrees. |
| 117 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional. |
| 118 | "latitude": "", # Latitude of the location, in decimal degrees. |
| 119 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional. |
| 120 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id. |
| 121 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional. |
| 122 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional. |
| 123 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional. |
| 124 | }</pre> |
| 125 | </div> |
| 126 | |
| 127 | <div class="method"> |
| 128 | <code class="details" id="insert">insert(body)</code> |
| 129 | <pre>Inserts or updates a location in the user's location history. |
| 130 | |
| 131 | Args: |
| 132 | body: object, The request body. (required) |
| 133 | The object takes the form of: |
| 134 | |
| 135 | { # 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. |
| 136 | "kind": "latitude#location", # Kind of this item. |
| 137 | "altitude": "", # Altitude of the location, in meters. Optional. |
| 138 | "longitude": "", # Longitude of the location, in decimal degrees. |
| 139 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional. |
| 140 | "latitude": "", # Latitude of the location, in decimal degrees. |
| 141 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional. |
| 142 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id. |
| 143 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional. |
| 144 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional. |
| 145 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional. |
| 146 | } |
| 147 | |
| 148 | |
| 149 | Returns: |
| 150 | An object of the form: |
| 151 | |
| 152 | { # 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. |
| 153 | "kind": "latitude#location", # Kind of this item. |
| 154 | "altitude": "", # Altitude of the location, in meters. Optional. |
| 155 | "longitude": "", # Longitude of the location, in decimal degrees. |
| 156 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional. |
| 157 | "latitude": "", # Latitude of the location, in decimal degrees. |
| 158 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional. |
| 159 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id. |
| 160 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional. |
| 161 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional. |
| 162 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional. |
| 163 | }</pre> |
| 164 | </div> |
| 165 | |
| 166 | <div class="method"> |
| 167 | <code class="details" id="list">list(min_time=None, max_results=None, granularity=None, max_time=None)</code> |
| 168 | <pre>Lists the user's location history. |
| 169 | |
| 170 | Args: |
| 171 | min_time: string, Minimum timestamp of locations to return (ms since epoch). |
| 172 | max_results: string, Maximum number of locations to return. |
| 173 | granularity: string, Granularity of the requested locations. |
| 174 | Allowed values |
| 175 | best - Request best available granularity. |
| 176 | city - Request city-level granularty. |
| 177 | max_time: string, Maximum timestamp of locations to return (ms since epoch). |
| 178 | |
| 179 | Returns: |
| 180 | An object of the form: |
| 181 | |
| 182 | { |
| 183 | "items": [ |
| 184 | { # 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. |
| 185 | "kind": "latitude#location", # Kind of this item. |
| 186 | "altitude": "", # Altitude of the location, in meters. Optional. |
| 187 | "longitude": "", # Longitude of the location, in decimal degrees. |
| 188 | "activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional. |
| 189 | "latitude": "", # Latitude of the location, in decimal degrees. |
| 190 | "altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional. |
| 191 | "timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id. |
| 192 | "speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional. |
| 193 | "heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional. |
| 194 | "accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional. |
| 195 | }, |
| 196 | ], |
| 197 | "kind": "latitude#locationFeed", |
| 198 | }</pre> |
| 199 | </div> |
| 200 | |
| 201 | </body></html> |