create static method

TimeseriesService create(
  1. Client httpClient,
  2. Uri baseUrl,
  3. RequestInterceptor authInterceptor
)

Implementation

static TimeseriesService create(
    http.Client httpClient, Uri baseUrl, RequestInterceptor authInterceptor) {
  final client = ChopperClient(
      client: httpClient,
      baseUrl: baseUrl,
      interceptors: [
        HttpRequestLoggingInterceptor(),
        authInterceptor,
      ],
      converter: const JsonSerializableConverter({
        GroupedScalarTimeseriesResponse:
            GroupedScalarTimeseriesResponse.fromJson,
        GroupedIntervalTimeseriesResponse:
            GroupedIntervalTimeseriesResponse.fromJson,
        GroupedBloodPressureTimeseriesResponse:
            GroupedBloodPressureTimeseriesResponse.fromJson
      }));

  return _$TimeseriesService(client);
}