-open-api

-cleanup
This commit is contained in:
CJPeckover 2025-07-14 13:57:10 -04:00
parent 705beca3aa
commit ba323107bf
3 changed files with 64 additions and 1 deletions

View file

@ -89,6 +89,7 @@ Class | Method | HTTP request | Description
*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} |
*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics |
*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums |
*AlbumsApi* | [**getAllAlbumsSlim**](doc//AlbumsApi.md#getallalbumsslim) | **GET** /albums/slim |
*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets |
*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} |
*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} |

View file

@ -385,6 +385,69 @@ class AlbumsApi {
return null;
}
/// Performs an HTTP 'GET /albums/slim' operation and returns the [Response].
/// Parameters:
///
/// * [String] assetId:
/// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
///
/// * [bool] shared:
Future<Response> getAllAlbumsSlimWithHttpInfo({ String? assetId, bool? shared, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/albums/slim';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (assetId != null) {
queryParams.addAll(_queryParams('', 'assetId', assetId));
}
if (shared != null) {
queryParams.addAll(_queryParams('', 'shared', shared));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
apiPath,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] assetId:
/// Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
///
/// * [bool] shared:
Future<List<AlbumResponseDto>?> getAllAlbumsSlim({ String? assetId, bool? shared, }) async {
final response = await getAllAlbumsSlimWithHttpInfo( assetId: assetId, shared: shared, );
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) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<AlbumResponseDto>') as List)
.cast<AlbumResponseDto>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'DELETE /albums/{id}/assets' operation and returns the [Response].
/// Parameters:
///

View file

@ -32,7 +32,6 @@ export class AlbumController {
@Authenticated({ permission: Permission.ALBUM_READ })
getAllAlbumsSlim(@Auth() auth: AuthDto, @Query() query: GetAlbumsDto): Promise<AlbumResponseDto[]> {
return this.service.getAll(auth, query, true);
//asdf
}
@Post()