renderWithHttpInfo method

Future<Response> renderWithHttpInfo(
  1. List<String> target, {
  2. String? from,
  3. String? until,
  4. int? maxDataPoints,
})

Timeseries values

Returns a timeseries of the values of the selected metric

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> renderWithHttpInfo(
  List<String> target, {
  String? from,
  String? until,
  int? maxDataPoints,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/render';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  for (var item in target) {
    queryParams.addAll(_queryParams('', 'target', item));
  }
  if (from != null) {
    queryParams.addAll(_queryParams('', 'from', from));
  }
  if (until != null) {
    queryParams.addAll(_queryParams('', 'until', until));
  }
  if (maxDataPoints != null) {
    queryParams.addAll(_queryParams('', 'maxDataPoints', maxDataPoints));
  }

  queryParams.addAll(_queryParams('', 'format', "json"));

  const contentTypes = <String>[];

  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}