class UsersDataSourcesDatasets extends Resource (View source)

The "datasets" collection of methods.

Typical usage is:

 $fitnessService = new Google\Service\Fitness(...);
 $datasets = $fitnessService->users_dataSources_datasets;

Methods

delete(string $userId, string $dataSourceId, string $datasetId, array $optParams = [])

Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.

get(string $userId, string $dataSourceId, string $datasetId, array $optParams = [])

Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time. (datasets.get)

patch(string $userId, string $dataSourceId, string $datasetId, Dataset $postBody, array $optParams = [])

Adds data points to a dataset. The dataset need not be previously created.

Details

delete(string $userId, string $dataSourceId, string $datasetId, array $optParams = [])

Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.

(datasets.delete)

Parameters

string $userId

Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

string $dataSourceId

The data stream ID of the data source that created the dataset.

string $datasetId

Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.

array $optParams

Optional parameters.

Exceptions

Exception

Dataset get(string $userId, string $dataSourceId, string $datasetId, array $optParams = [])

Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time. (datasets.get)

Parameters

string $userId

Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

string $dataSourceId

The data stream ID of the data source that created the dataset.

string $datasetId

Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.

array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception

Dataset patch(string $userId, string $dataSourceId, string $datasetId, Dataset $postBody, array $optParams = [])

Adds data points to a dataset. The dataset need not be previously created.

All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced. (datasets.patch)

Parameters

string $userId

Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

string $dataSourceId

The data stream ID of the data source that created the dataset.

string $datasetId

This field is not used, and can be safely omitted.

Dataset $postBody
array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception