getBaseBasesByOrg method
Describes ONE org's Base — whether its store exists, and what it occupies.
Describes ONE org's Base — whether its store exists, and what it occupies. The org must be one the caller's token carries; any other is not found, so this cannot be used to learn which orgs exist. That check is the same membership set the listing is built from, which is why the two can never disagree about what a caller may see.
Parameters:
- String org (required): Org is the org whose Base to describe, from the path. An org the caller's token does not carry is not found — the same answer a nonexistent one gets, so the listing cannot be used to discover which orgs exist.
Implementation
Future<BaseView?> getBaseBasesByOrg(String org,) async {
final response = await getBaseBasesByOrgWithHttpInfo(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.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'BaseView',) as BaseView;
}
return null;
}