201 lines
8.3 KiB
HTML
201 lines
8.3 KiB
HTML
<html><body>
|
|
<style>
|
|
|
|
body, h1, h2, h3, div, span, p, pre, a {
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
font-weight: inherit;
|
|
font-style: inherit;
|
|
font-size: 100%;
|
|
font-family: inherit;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
body {
|
|
font-size: 13px;
|
|
padding: 1em;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 26px;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 24px;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 20px;
|
|
margin-bottom: 1em;
|
|
margin-top: 1em;
|
|
}
|
|
|
|
pre, code {
|
|
line-height: 1.5;
|
|
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
|
|
}
|
|
|
|
pre {
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
h1, h2, h3, p {
|
|
font-family: Arial, sans serif;
|
|
}
|
|
|
|
h1, h2, h3 {
|
|
border-bottom: solid #CCC 1px;
|
|
}
|
|
|
|
.toc_element {
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
.firstline {
|
|
margin-left: 2 em;
|
|
}
|
|
|
|
.method {
|
|
margin-top: 1em;
|
|
border: solid 1px #CCC;
|
|
padding: 1em;
|
|
background: #EEE;
|
|
}
|
|
|
|
.details {
|
|
font-weight: bold;
|
|
font-size: 14px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<h1><a href="latitude_v1.html">Google Latitude API</a> . <a href="latitude_v1.location.html">location</a></h1>
|
|
<h2>Instance Methods</h2>
|
|
<p class="toc_element">
|
|
<code><a href="#delete">delete(locationId)</a></code></p>
|
|
<p class="firstline">Deletes a location from the user's location history.</p>
|
|
<p class="toc_element">
|
|
<code><a href="#get">get(locationId, granularity=None)</a></code></p>
|
|
<p class="firstline">Reads a location from the user's location history.</p>
|
|
<p class="toc_element">
|
|
<code><a href="#insert">insert(body)</a></code></p>
|
|
<p class="firstline">Inserts or updates a location in the user's location history.</p>
|
|
<p class="toc_element">
|
|
<code><a href="#list">list(min_time=None, max_results=None, granularity=None, max_time=None)</a></code></p>
|
|
<p class="firstline">Lists the user's location history.</p>
|
|
<h3>Method Details</h3>
|
|
<div class="method">
|
|
<code class="details" id="delete">delete(locationId)</code>
|
|
<pre>Deletes a location from the user's location history.
|
|
|
|
Args:
|
|
locationId: string, Timestamp of the location to delete (ms since epoch). (required)
|
|
</pre>
|
|
</div>
|
|
|
|
<div class="method">
|
|
<code class="details" id="get">get(locationId, granularity=None)</code>
|
|
<pre>Reads a location from the user's location history.
|
|
|
|
Args:
|
|
locationId: string, Timestamp of the location to read (ms since epoch). (required)
|
|
granularity: string, Granularity of the location to return.
|
|
Allowed values
|
|
best - Request best available granularity.
|
|
city - Request city-level granularty.
|
|
|
|
Returns:
|
|
An object of the form:
|
|
|
|
{ # 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.
|
|
"kind": "latitude#location", # Kind of this item.
|
|
"altitude": "", # Altitude of the location, in meters. Optional.
|
|
"longitude": "", # Longitude of the location, in decimal degrees.
|
|
"activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.
|
|
"latitude": "", # Latitude of the location, in decimal degrees.
|
|
"altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.
|
|
"timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.
|
|
"speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.
|
|
"heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.
|
|
"accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.
|
|
}</pre>
|
|
</div>
|
|
|
|
<div class="method">
|
|
<code class="details" id="insert">insert(body)</code>
|
|
<pre>Inserts or updates a location in the user's location history.
|
|
|
|
Args:
|
|
body: object, The request body. (required)
|
|
The object takes the form of:
|
|
|
|
{ # 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.
|
|
"kind": "latitude#location", # Kind of this item.
|
|
"altitude": "", # Altitude of the location, in meters. Optional.
|
|
"longitude": "", # Longitude of the location, in decimal degrees.
|
|
"activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.
|
|
"latitude": "", # Latitude of the location, in decimal degrees.
|
|
"altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.
|
|
"timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.
|
|
"speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.
|
|
"heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.
|
|
"accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.
|
|
}
|
|
|
|
|
|
Returns:
|
|
An object of the form:
|
|
|
|
{ # 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.
|
|
"kind": "latitude#location", # Kind of this item.
|
|
"altitude": "", # Altitude of the location, in meters. Optional.
|
|
"longitude": "", # Longitude of the location, in decimal degrees.
|
|
"activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.
|
|
"latitude": "", # Latitude of the location, in decimal degrees.
|
|
"altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.
|
|
"timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.
|
|
"speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.
|
|
"heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.
|
|
"accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.
|
|
}</pre>
|
|
</div>
|
|
|
|
<div class="method">
|
|
<code class="details" id="list">list(min_time=None, max_results=None, granularity=None, max_time=None)</code>
|
|
<pre>Lists the user's location history.
|
|
|
|
Args:
|
|
min_time: string, Minimum timestamp of locations to return (ms since epoch).
|
|
max_results: string, Maximum number of locations to return.
|
|
granularity: string, Granularity of the requested locations.
|
|
Allowed values
|
|
best - Request best available granularity.
|
|
city - Request city-level granularty.
|
|
max_time: string, Maximum timestamp of locations to return (ms since epoch).
|
|
|
|
Returns:
|
|
An object of the form:
|
|
|
|
{
|
|
"items": [
|
|
{ # 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.
|
|
"kind": "latitude#location", # Kind of this item.
|
|
"altitude": "", # Altitude of the location, in meters. Optional.
|
|
"longitude": "", # Longitude of the location, in decimal degrees.
|
|
"activityId": "", # Unique ID of the Buzz message that corresponds to the check-in associated with this location. Available only for check-in locations. Optional.
|
|
"latitude": "", # Latitude of the location, in decimal degrees.
|
|
"altitudeAccuracy": "", # Accuracy of the altitude value, in meters. Optional.
|
|
"timestampMs": "", # Timestamp of the Location Resource, in milliseconds since the epoch (UTC). This is also the Location Resource's unique id.
|
|
"speed": "", # Ground speed of the user at the time this location was recorded, in meters per second. Non-negative. Optional.
|
|
"heading": "", # Direction of travel of the user when this location was recorded. In degrees, clockwise relative to true north. Optional.
|
|
"accuracy": "", # Accuracy of the latitude and longitude coordinates, in non-negative meters. Optional.
|
|
},
|
|
],
|
|
"kind": "latitude#locationFeed",
|
|
}</pre>
|
|
</div>
|
|
|
|
</body></html> |