delete method
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.
Request parameters:
userId
- Delete a dataset for the person identified. Use me to indicate
the authenticated user. Only me is supported at this time.
dataSourceId
- The data stream ID of the data source that created the
dataset.
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.
$fields
- Selector specifying which fields to include in a partial
response.
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<void> delete(
core.String userId,
core.String dataSourceId,
core.String datasetId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = commons.escapeVariable('$userId') +
'/dataSources/' +
commons.escapeVariable('$dataSourceId') +
'/datasets/' +
commons.escapeVariable('$datasetId');
await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
downloadOptions: null,
);
}