mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
-open-api
-cleanup
This commit is contained in:
parent
705beca3aa
commit
ba323107bf
3 changed files with 64 additions and 1 deletions
1
mobile/openapi/README.md
generated
1
mobile/openapi/README.md
generated
|
|
@ -89,6 +89,7 @@ Class | Method | HTTP request | Description
|
||||||
*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} |
|
*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} |
|
||||||
*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics |
|
*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics |
|
||||||
*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums |
|
*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* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets |
|
||||||
*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} |
|
*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} |
|
||||||
*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} |
|
*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} |
|
||||||
|
|
|
||||||
63
mobile/openapi/lib/api/albums_api.dart
generated
63
mobile/openapi/lib/api/albums_api.dart
generated
|
|
@ -385,6 +385,69 @@ class AlbumsApi {
|
||||||
return null;
|
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].
|
/// Performs an HTTP 'DELETE /albums/{id}/assets' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ export class AlbumController {
|
||||||
@Authenticated({ permission: Permission.ALBUM_READ })
|
@Authenticated({ permission: Permission.ALBUM_READ })
|
||||||
getAllAlbumsSlim(@Auth() auth: AuthDto, @Query() query: GetAlbumsDto): Promise<AlbumResponseDto[]> {
|
getAllAlbumsSlim(@Auth() auth: AuthDto, @Query() query: GetAlbumsDto): Promise<AlbumResponseDto[]> {
|
||||||
return this.service.getAll(auth, query, true);
|
return this.service.getAll(auth, query, true);
|
||||||
//asdf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue