Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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.

class Health {
constructor(client?: CredentialsClient, baseUrl?: string);
async usersDataTypesDataPointsBatchDelete(parent: string, req: BatchDeleteDataPointsRequest): Promise<Operation>;
async usersDataTypesDataPointsCreate(parent: string, req: DataPoint): Promise<Operation>;
async usersDataTypesDataPointsDailyRollUp(parent: string, req: DailyRollUpDataPointsRequest): Promise<DailyRollUpDataPointsResponse>;
async usersDataTypesDataPointsExportExerciseTcx(name: string, opts?: UsersDataTypesDataPointsExportExerciseTcxOptions): Promise<ExportExerciseTcxResponse>;
async usersDataTypesDataPointsList(parent: string, opts?: UsersDataTypesDataPointsListOptions): Promise<ListDataPointsResponse>;
async usersDataTypesDataPointsPatch(
name: string,
req: DataPoint,
): Promise<Operation>;
async usersDataTypesDataPointsReconcile(parent: string, opts?: UsersDataTypesDataPointsReconcileOptions): Promise<ReconcileDataPointsResponse>;
async usersDataTypesDataPointsRollUp(parent: string, req: RollUpDataPointsRequest): Promise<RollUpDataPointsResponse>;
async usersGetIdentity(name: string): Promise<Identity>;
async usersGetProfile(name: string): Promise<Profile>;
async usersGetSettings(name: string): Promise<Settings>;
async usersUpdateProfile(
name: string,
req: Profile,
): Promise<Profile>;
async usersUpdateSettings(
name: string,
req: Settings,
): Promise<Settings>;
}

§Constructors

§
new Health(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
usersDataTypesDataPointsBatchDelete(parent: string, req: BatchDeleteDataPointsRequest): Promise<Operation>
[src]

Delete a batch of identifyable data points.

@param parent

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.

§
usersDataTypesDataPointsCreate(parent: string, req: DataPoint): Promise<Operation>
[src]

Creates a single identifiable data point.

@param parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

§
usersDataTypesDataPointsDailyRollUp(parent: string, req: DailyRollUpDataPointsRequest): Promise<DailyRollUpDataPointsResponse>
[src]

Roll up data points over civil time intervals for supported data types.

@param parent

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.

§
usersDataTypesDataPointsExportExerciseTcx(name: string, opts?: UsersDataTypesDataPointsExportExerciseTcxOptions): Promise<ExportExerciseTcxResponse>
[src]

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.

@param name

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.

§
usersDataTypesDataPointsList(parent: string, opts?: UsersDataTypesDataPointsListOptions): Promise<ListDataPointsResponse>
[src]

Query user health and fitness data points.

@param parent

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.

§
usersDataTypesDataPointsPatch(name: string, req: DataPoint, opts?: UsersDataTypesDataPointsPatchOptions): Promise<Operation>
[src]

Updates a single identifiable data point. If a data point with the specified name is not found, the request will fail.

@param name

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.

§
usersDataTypesDataPointsReconcile(parent: string, opts?: UsersDataTypesDataPointsReconcileOptions): Promise<ReconcileDataPointsResponse>
[src]

Reconcile data points from multiple data sources into a single data stream.

@param parent

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.

§
usersDataTypesDataPointsRollUp(parent: string, req: RollUpDataPointsRequest): Promise<RollUpDataPointsResponse>
[src]

Roll up data points over physical time intervals for supported data types.

@param parent

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.

§
usersGetIdentity(name: string): Promise<Identity>
[src]

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.

@param name

Required. The resource name of the Identity. Format: users/me/identity

§
usersGetProfile(name: string): Promise<Profile>
[src]

Returns user Profile details.

@param name

Required. The name of the Profile. Format: users/me/profile.

§
usersGetSettings(name: string): Promise<Settings>
[src]

Returns user settings details.

@param name

Required. The name of the Settings. Format: users/me/settings.

§
usersUpdateProfile(name: string, req: Profile, opts?: UsersUpdateProfileOptions): Promise<Profile>
[src]

Updates the user's profile details.

@param name

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.

§
usersUpdateSettings(name: string, req: Settings, opts?: UsersUpdateSettingsOptions): Promise<Settings>
[src]

Updates the user's settings details.

@param name

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.