Google Latitude API . location

Instance Methods

delete(locationId)

Deletes a location from the user's location history.

get(locationId, granularity=None)

Reads a location from the user's location history.

insert(body)

Inserts or updates a location in the user's location history.

list(min_time=None, max_results=None, granularity=None, max_time=None)

Lists the user's location history.

Method Details

delete(locationId)
Deletes a location from the user's location history.

Args:
  locationId: string, Timestamp of the location to delete (ms since epoch). (required)
get(locationId, granularity=None)
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.
  }
insert(body)
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.
  }
list(min_time=None, max_results=None, granularity=None, max_time=None)
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",
  }