getAuthorizations method
List all authorizations
Parameters:
-
String zapTraceSpan: OpenTracing span context
-
String userID: Only show authorizations that belong to a user ID.
-
String user: Only show authorizations that belong to a user name.
-
String orgID: Only show authorizations that belong to an organization ID.
-
String org: Only show authorizations that belong to a organization name.
Implementation
Future<Authorizations> getAuthorizations(
{String? zapTraceSpan,
String? userID,
String? user,
String? orgID,
String? org}) async {
final response = await getAuthorizationsWithHttpInfo(
zapTraceSpan: zapTraceSpan,
userID: userID,
user: user,
orgID: orgID,
org: org);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'Authorizations',
) as Authorizations;
}
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}