getInfoVersion method

Future<ApplicationVersionInfo> getInfoVersion({
  1. Options? options,
})

Gets information as to what this server is.

Implementation

Future<ApplicationVersionInfo> getInfoVersion({Options? options}) async {
  final response = await apiDelegate.getInfoVersion(
    options: options,
  );

  if (![200].contains(response.statusCode)) {
    throw ApiException(500,
        'Invalid response code ${response.statusCode} returned from API');
  }

  final __body = response.body;
  if (response.statusCode >= 400) {
    throw ApiException(response.statusCode,
        __body == null ? null : await decodeBodyBytes(__body));
  }

  if (__body == null) {
    throw ApiException(500, 'Received an empty body (not in a 204)');
  }

  return await apiDelegate.getInfoVersion_decode(__body);
}