Google Health API . users

Instance Methods

dataTypes()

Returns the dataTypes Resource.

close()

Close httplib2 connections.

getIdentity(name, x__xgafv=None)

Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

getProfile(name, x__xgafv=None)

Returns user Profile details.

getSettings(name, x__xgafv=None)

Returns user settings details.

updateProfile(name, body=None, updateMask=None, x__xgafv=None)

Updates the user's profile details.

updateSettings(name, body=None, updateMask=None, x__xgafv=None)

Updates the user's settings details.

Method Details

close()
Close httplib2 connections.
getIdentity(name, x__xgafv=None)
Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

Args:
  name: string, Required. The resource name of the Identity. Format: `users/me/identity` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents details about the Google user's identity.
  "healthUserId": "A String", # Output only. The Google User Identifier in the Google Health APIs. It matches the `{user}` resource ID segment in the resource name paths, e.g. `users/{user}/dataTypes/steps`. Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens.
  "legacyUserId": "A String", # Output only. The legacy Fitbit User identifier. This is the Fitbit ID used in the legacy Fitbit APIs (v1-v3). It can be referenced by clients migrating from the legacy Fitbit APIs to map their existing identifiers to the new Google user ID. It **must not** be used for any other purpose. It is not of any use for new clients using only the Google Health APIs. Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens.
  "name": "A String", # Identifier. The resource name of this Identity resource. Format: `users/me/identity`
}
getProfile(name, x__xgafv=None)
Returns user Profile details.

Args:
  name: string, Required. The name of the Profile. Format: `users/me/profile`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Profile details.
  "age": 42, # Optional. The age in years based on the user's birth date. Updates to this field are currently not supported.
  "autoRunningStrideLengthMm": 42, # Output only. The automatically calculated running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "autoWalkingStrideLengthMm": 42, # Output only. The automatically calculated walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "membershipStartDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. The date the user created their account. Updates to this field are currently not supported.
    "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
    "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  },
  "name": "A String", # Identifier. The resource name of this Profile resource. Format: `users/{user}/profile` Example: `users/1234567890/profile` or `users/me/profile` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "userConfiguredRunningStrideLengthMm": 42, # Optional. The user's user configured running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "userConfiguredWalkingStrideLengthMm": 42, # Optional. The user's user configured walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
}
getSettings(name, x__xgafv=None)
Returns user settings details.

Args:
  name: string, Required. The name of the Settings. Format: `users/me/settings`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Settings details.
  "autoStrideEnabled": True or False, # Optional. True if the user's stride length is determined automatically. Updates to this field are currently not supported.
  "distanceUnit": "A String", # Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
  "glucoseUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "heightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "languageLocale": "A String", # Optional. The locale defined in the user's account settings. Updates to this field are currently not supported.
  "name": "A String", # Identifier. The resource name of this Settings resource. Format: `users/{user}/settings` Example: `users/1234567890/settings` or `users/me/settings` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "strideLengthRunningType": "A String", # Optional. The stride length type defined in the user's account settings for running. Updates to this field are currently not supported.
  "strideLengthWalkingType": "A String", # Optional. The stride length type defined in the user's account settings for walking. Updates to this field are currently not supported.
  "swimUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "temperatureUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "timeZone": "A String", # Optional. The timezone defined in the user's account settings. This follows the IANA [Time Zone Database](https://www.iana.org/time-zones). Updates to this field are currently not supported.
  "utcOffset": "A String", # Optional. The user's timezone offset relative to UTC. Updates to this field are currently not supported.
  "waterUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "weightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
}
updateProfile(name, body=None, updateMask=None, x__xgafv=None)
Updates the user's profile details.

Args:
  name: string, Identifier. The resource name of this Profile resource. Format: `users/{user}/profile` Example: `users/1234567890/profile` or `users/me/profile` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user. (required)
  body: object, The request body.
    The object takes the form of:

{ # Profile details.
  "age": 42, # Optional. The age in years based on the user's birth date. Updates to this field are currently not supported.
  "autoRunningStrideLengthMm": 42, # Output only. The automatically calculated running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "autoWalkingStrideLengthMm": 42, # Output only. The automatically calculated walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "membershipStartDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. The date the user created their account. Updates to this field are currently not supported.
    "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
    "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  },
  "name": "A String", # Identifier. The resource name of this Profile resource. Format: `users/{user}/profile` Example: `users/1234567890/profile` or `users/me/profile` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "userConfiguredRunningStrideLengthMm": 42, # Optional. The user's user configured running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "userConfiguredWalkingStrideLengthMm": 42, # Optional. The user's user configured walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
}

  updateMask: string, Optional. The list of fields to be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Profile details.
  "age": 42, # Optional. The age in years based on the user's birth date. Updates to this field are currently not supported.
  "autoRunningStrideLengthMm": 42, # Output only. The automatically calculated running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "autoWalkingStrideLengthMm": 42, # Output only. The automatically calculated walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "membershipStartDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. The date the user created their account. Updates to this field are currently not supported.
    "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
    "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  },
  "name": "A String", # Identifier. The resource name of this Profile resource. Format: `users/{user}/profile` Example: `users/1234567890/profile` or `users/me/profile` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "userConfiguredRunningStrideLengthMm": 42, # Optional. The user's user configured running stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
  "userConfiguredWalkingStrideLengthMm": 42, # Optional. The user's user configured walking stride length, in millimeters. The user must consent to one of the following access scopes to access this field: - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
}
updateSettings(name, body=None, updateMask=None, x__xgafv=None)
Updates the user's settings details.

Args:
  name: string, Identifier. The resource name of this Settings resource. Format: `users/{user}/settings` Example: `users/1234567890/settings` or `users/me/settings` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user. (required)
  body: object, The request body.
    The object takes the form of:

{ # Settings details.
  "autoStrideEnabled": True or False, # Optional. True if the user's stride length is determined automatically. Updates to this field are currently not supported.
  "distanceUnit": "A String", # Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
  "glucoseUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "heightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "languageLocale": "A String", # Optional. The locale defined in the user's account settings. Updates to this field are currently not supported.
  "name": "A String", # Identifier. The resource name of this Settings resource. Format: `users/{user}/settings` Example: `users/1234567890/settings` or `users/me/settings` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "strideLengthRunningType": "A String", # Optional. The stride length type defined in the user's account settings for running. Updates to this field are currently not supported.
  "strideLengthWalkingType": "A String", # Optional. The stride length type defined in the user's account settings for walking. Updates to this field are currently not supported.
  "swimUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "temperatureUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "timeZone": "A String", # Optional. The timezone defined in the user's account settings. This follows the IANA [Time Zone Database](https://www.iana.org/time-zones). Updates to this field are currently not supported.
  "utcOffset": "A String", # Optional. The user's timezone offset relative to UTC. Updates to this field are currently not supported.
  "waterUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "weightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
}

  updateMask: string, Optional. The list of fields to be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Settings details.
  "autoStrideEnabled": True or False, # Optional. True if the user's stride length is determined automatically. Updates to this field are currently not supported.
  "distanceUnit": "A String", # Optional. The measurement unit defined in the user's account settings. Updates to this field are currently not supported.
  "glucoseUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "heightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "languageLocale": "A String", # Optional. The locale defined in the user's account settings. Updates to this field are currently not supported.
  "name": "A String", # Identifier. The resource name of this Settings resource. Format: `users/{user}/settings` Example: `users/1234567890/settings` or `users/me/settings` The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal `me` can also be used to refer to the authenticated user.
  "strideLengthRunningType": "A String", # Optional. The stride length type defined in the user's account settings for running. Updates to this field are currently not supported.
  "strideLengthWalkingType": "A String", # Optional. The stride length type defined in the user's account settings for walking. Updates to this field are currently not supported.
  "swimUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "temperatureUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "timeZone": "A String", # Optional. The timezone defined in the user's account settings. This follows the IANA [Time Zone Database](https://www.iana.org/time-zones). Updates to this field are currently not supported.
  "utcOffset": "A String", # Optional. The user's timezone offset relative to UTC. Updates to this field are currently not supported.
  "waterUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
  "weightUnit": "A String", # Optional. The measurement unit defined in the user's account settings.
}