annotate method

Future<AnnotatedResponses> annotate({
  1. required AnnotationRequests requests,
})
inherited

Run detection and annotation for a batch of requests.

Implementation

Future<AnnotatedResponses> annotate({required AnnotationRequests requests}) {
  if (_token != null) {
    dio.options.headers[HttpHeaders.authorizationHeader] = 'Bearer $_token';
  }

  if (_apiKey != null) {
    dio.options.queryParameters['key'] = _apiKey;
  }

  return _rest.annotate(
    // 'Bearer $_token',
    contentType,
    requests.toJson(),
  );
}