readTensorboardTimeSeriesData method

Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data is returned. Otherwise, 1000 data points is randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can't be greater than 10k.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<ReadTensorboardTimeSeriesDataResponse> readTensorboardTimeSeriesData(
  ReadTensorboardTimeSeriesDataRequest request,
) async {
  final url =
      Uri.https(_host, '/v1beta1/${request.tensorboardTimeSeries}:read', {
        if (request.maxDataPoints case final $1 when $1.isNotDefault)
          'maxDataPoints': '${$1}',
        if (request.filter case final $1 when $1.isNotDefault) 'filter': $1,
      });
  final response = await _client.get(url);
  return ReadTensorboardTimeSeriesDataResponse.fromJson(response);
}