list method

Future<ListDataPointChangesResponse> list(
  1. String userId,
  2. String dataSourceId, {
  3. int? limit,
  4. String? pageToken,
  5. String? $fields,
})

Queries for user's data point changes for a particular data source.

Request parameters:

userId - List data points 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.

limit - If specified, no more than this many data point changes will be included in the response.

pageToken - The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous response.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListDataPointChangesResponse.

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<ListDataPointChangesResponse> list(
  core.String userId,
  core.String dataSourceId, {
  core.int? limit,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (limit != null) 'limit': ['${limit}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = commons.escapeVariable('$userId') +
      '/dataSources/' +
      commons.escapeVariable('$dataSourceId') +
      '/dataPointChanges';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListDataPointChangesResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}