reconcile method
Reconcile data points from multiple data sources into a single data stream.
Request parameters:
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.
Value must have pattern ^users/\[^/\]+/dataTypes/\[^/\]+$.
dataSourceFamily - Optional. The data source family name to reconcile.
If empty, data points from all data sources will be reconciled. Format:
users/me/dataSourceFamilies/{data_source_family} -
users/me/dataSourceFamilies/all-sources - Default value. Includes data
from all available data sources. -
users/me/dataSourceFamilies/google-wearables - Includes data from Google
and Fitbit tracker devices (such as Fitbit trackers and Pixel Watch).
Excludes manually logged data. -
users/me/dataSourceFamilies/google-sources - Includes first-party Google
data, such as data from tracker devices, manually logged data, and Health
Connect.
filter - Optional. Filter expression based on https://aip.dev/160. A
time range, either physical or civil, can be specified. See the
ListDataPointsRequest.filter for the supported fields and syntax.
pageSize - Optional. The maximum number of data points to return. If
unspecified, at most 1440 data points will be returned. The maximum page
size is 10000; values above that will be truncated accordingly. For
exercise and sleep the default page size is 25. The maximum page size
for exercise and sleep is 25.
pageToken - Optional. The next_page_token from a previous request, if
any.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ReconcileDataPointsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ReconcileDataPointsResponse> reconcile(
core.String parent, {
core.String? dataSourceFamily,
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'dataSourceFamily': ?dataSourceFamily == null ? null : [dataSourceFamily],
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v4/' + core.Uri.encodeFull('$parent') + '/dataPoints:reconcile';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ReconcileDataPointsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}