User

class radar.models.user.User(radar, data={})[source]

A user represents a user tracked in your project. Users can be referenced by Radar _id, userId, or deviceId.

Parameters:
  • _id (string) – A unique ID for the user, provided by Radar. An alphanumeric string.
  • live (boolean) – true if the user was created with your live API key, false if the user was created with your test API key.
  • userId (string) – A stable unique ID for the user.
  • deviceId (string) – A device ID for the user.
  • description (string) – An optional description for the user.
  • metadata (dict) – An optional dictionary of custom metadata for the user.
  • location (GeoJSON) – The user’s last known location, a Point in GeoJSON format.
  • locationAccuracy (number) – The accuracy of the user’s last known location in meters.
  • foreground (boolean) – true if the user’s last known location was updated in the foreground, false if the user’s last known location was updated in the background.
  • stopped (boolean) – true if the user’s last known location was updated while stopped, false if the user’s last known location was updated while moving.
  • deviceType (string) – The user’s device type, one of iOS, Android, or Web.
  • updatedAt (datetime) – The datetime when the user’s location was last updated.
  • geofences (list of Geofence) – An array of the user’s last known geofences.
  • place (Place) – When Places is enabled, the user’s last known place.
  • insights (dict) – When Insights is enabled, the user’s learned approximate home and office locations, and home, office, and traveling state.