mirror of
https://github.com/immich-app/immich.git
synced 2025-07-17 20:38:25 +02:00
fix(server): album statistics endpoint (#11924)
This commit is contained in:
parent
cde0458dc8
commit
ef9a06be5c
14 changed files with 111 additions and 111 deletions
mobile/openapi/lib/api
82
mobile/openapi/lib/api/albums_api.dart
generated
82
mobile/openapi/lib/api/albums_api.dart
generated
|
@ -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:
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue