Health
import { Health } from "https://googleapis.deno.dev/v1/health:v4.ts";The Google Health API lets you view and manage health and fitness metrics and measurement data.
§Methods
Delete a batch of identifyable data points.
Optional. Parent (data type) for the Data Point collection Format: users/me/dataTypes/{data_type}, e.g.: - users/me/dataTypes/steps - users/me/dataTypes/- For a list of the supported data types see the DataPoint data union field. Deleting data points across multiple data type collections is supported following https://aip.dev/159. If this is set, the parent of all of the data points specified in names must match this field.
Roll up data points over civil time intervals for supported data types.
Required. Parent data type of the Data Point collection. Format: users/{user}/dataTypes/{data_type}, e.g.: - users/me/dataTypes/steps - users/me/dataTypes/distance For a list of the supported data types see the DailyRollupDataPoint value union field.
Exports exercise data in TCX format. Note: While the Authorization section
below states that any one of the listed scopes is accepted, this specific
method requires the user to provide both one of the activity_and_fitness
scopes (normal or readonly) AND one of the location scopes (normal
or readonly) in their access token to succeed.
Required. The resource name of the exercise data point to export. Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808 The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.
Query user health and fitness data points.
Required. Parent data type of the Data Point collection. Format: users/me/dataTypes/{data_type}, e.g.: - users/me/dataTypes/steps - users/me/dataTypes/weight For a list of the supported data types see the DataPoint data union field.
Updates a single identifiable data point. If a data point with the
specified name is not found, the request will fail.
Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point} Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef The {user} ID is a system-generated identifier, as described in Profile.encoded_id. The {data_type} ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. total-calories for the total_calories field. The {data_point} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
Reconcile data points from multiple data sources into a single data stream.
Required. Parent data type of the Data Point collection. Format: users/me/dataTypes/{data_type}, e.g.: - users/me/dataTypes/steps - users/me/dataTypes/heart-rate For a list of the supported data types see the DataPoint data union field.
Roll up data points over physical time intervals for supported data types.
Required. Parent data type of the Data Point collection. Format: users/{user}/dataTypes/{data_type}, e.g.: - users/me/dataTypes/steps - users/me/dataTypes/distance For a list of the supported data types see the RollupDataPoint value union field.
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.
Required. The resource name of the Identity. Format: users/me/identity
Updates the user's profile details.
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.
Updates the user's settings details.
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.