fix(server): album statistics endpoint ()

This commit is contained in:
Jason Rasmussen 2024-08-20 07:50:36 -04:00 committed by GitHub
commit ef9a06be5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 111 additions and 111 deletions
mobile/openapi/lib/api

View file

@ -218,47 +218,6 @@ class AlbumsApi {
}
}
/// Performs an HTTP 'GET /albums/count' operation and returns the [Response].
Future<Response> getAlbumCountWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/albums/count';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<AlbumCountResponseDto?> getAlbumCount() async {
final response = await getAlbumCountWithHttpInfo();
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), 'AlbumCountResponseDto',) as AlbumCountResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /albums/{id}' operation and returns the [Response].
/// Parameters:
///
@ -322,6 +281,47 @@ class AlbumsApi {
return null;
}
/// Performs an HTTP 'GET /albums/statistics' operation and returns the [Response].
Future<Response> getAlbumStatisticsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/albums/statistics';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<AlbumStatisticsResponseDto?> getAlbumStatistics() async {
final response = await getAlbumStatisticsWithHttpInfo();
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), 'AlbumStatisticsResponseDto',) as AlbumStatisticsResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /albums' operation and returns the [Response].
/// Parameters:
///