mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): album controller (#2539)
* refactor: album controller/service * chore: open-api * fix: tests
This commit is contained in:
16
mobile/openapi/README.md
generated
16
mobile/openapi/README.md
generated
@@ -77,18 +77,18 @@ Class | Method | HTTP request | Description
|
||||
*APIKeyApi* | [**getKey**](doc//APIKeyApi.md#getkey) | **GET** /api-key/{id} |
|
||||
*APIKeyApi* | [**getKeys**](doc//APIKeyApi.md#getkeys) | **GET** /api-key |
|
||||
*APIKeyApi* | [**updateKey**](doc//APIKeyApi.md#updatekey) | **PUT** /api-key/{id} |
|
||||
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
|
||||
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
|
||||
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
|
||||
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
|
||||
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
|
||||
*AlbumApi* | [**createAlbumSharedLink**](doc//AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
||||
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
|
||||
*AlbumApi* | [**downloadArchive**](doc//AlbumApi.md#downloadarchive) | **GET** /album/{albumId}/download |
|
||||
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
|
||||
*AlbumApi* | [**downloadArchive**](doc//AlbumApi.md#downloadarchive) | **GET** /album/{id}/download |
|
||||
*AlbumApi* | [**getAlbumCountByUserId**](doc//AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
||||
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
|
||||
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
|
||||
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
|
||||
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
|
||||
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
|
||||
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
|
||||
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||
*AssetApi* | [**addAssetsToSharedLink**](doc//AssetApi.md#addassetstosharedlink) | **PATCH** /asset/shared-link/add |
|
||||
*AssetApi* | [**checkDuplicateAsset**](doc//AssetApi.md#checkduplicateasset) | **POST** /asset/check |
|
||||
*AssetApi* | [**checkExistingAssets**](doc//AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||
|
||||
80
mobile/openapi/doc/AlbumApi.md
generated
80
mobile/openapi/doc/AlbumApi.md
generated
@@ -9,22 +9,22 @@ All URIs are relative to */api*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addAssetsToAlbum**](AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
|
||||
[**addUsersToAlbum**](AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
|
||||
[**addAssetsToAlbum**](AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
|
||||
[**addUsersToAlbum**](AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
|
||||
[**createAlbum**](AlbumApi.md#createalbum) | **POST** /album |
|
||||
[**createAlbumSharedLink**](AlbumApi.md#createalbumsharedlink) | **POST** /album/create-shared-link |
|
||||
[**deleteAlbum**](AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
|
||||
[**downloadArchive**](AlbumApi.md#downloadarchive) | **GET** /album/{albumId}/download |
|
||||
[**deleteAlbum**](AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
|
||||
[**downloadArchive**](AlbumApi.md#downloadarchive) | **GET** /album/{id}/download |
|
||||
[**getAlbumCountByUserId**](AlbumApi.md#getalbumcountbyuserid) | **GET** /album/count-by-user-id |
|
||||
[**getAlbumInfo**](AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
|
||||
[**getAlbumInfo**](AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
|
||||
[**getAllAlbums**](AlbumApi.md#getallalbums) | **GET** /album |
|
||||
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
|
||||
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
|
||||
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
|
||||
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||
|
||||
|
||||
# **addAssetsToAlbum**
|
||||
> AddAssetsResponseDto addAssetsToAlbum(albumId, addAssetsDto, key)
|
||||
> AddAssetsResponseDto addAssetsToAlbum(id, addAssetsDto, key)
|
||||
|
||||
|
||||
|
||||
@@ -47,12 +47,12 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
|
||||
final key = key_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto, key);
|
||||
final result = api_instance.addAssetsToAlbum(id, addAssetsDto, key);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
|
||||
@@ -63,7 +63,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**addAssetsDto** | [**AddAssetsDto**](AddAssetsDto.md)| |
|
||||
**key** | **String**| | [optional]
|
||||
|
||||
@@ -83,7 +83,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **addUsersToAlbum**
|
||||
> AlbumResponseDto addUsersToAlbum(albumId, addUsersDto)
|
||||
> AlbumResponseDto addUsersToAlbum(id, addUsersDto)
|
||||
|
||||
|
||||
|
||||
@@ -106,11 +106,11 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final addUsersDto = AddUsersDto(); // AddUsersDto |
|
||||
|
||||
try {
|
||||
final result = api_instance.addUsersToAlbum(albumId, addUsersDto);
|
||||
final result = api_instance.addUsersToAlbum(id, addUsersDto);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->addUsersToAlbum: $e\n');
|
||||
@@ -121,7 +121,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**addUsersDto** | [**AddUsersDto**](AddUsersDto.md)| |
|
||||
|
||||
### Return type
|
||||
@@ -250,7 +250,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **deleteAlbum**
|
||||
> deleteAlbum(albumId)
|
||||
> deleteAlbum(id)
|
||||
|
||||
|
||||
|
||||
@@ -273,10 +273,10 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
|
||||
try {
|
||||
api_instance.deleteAlbum(albumId);
|
||||
api_instance.deleteAlbum(id);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->deleteAlbum: $e\n');
|
||||
}
|
||||
@@ -286,7 +286,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -304,7 +304,7 @@ void (empty response body)
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **downloadArchive**
|
||||
> MultipartFile downloadArchive(albumId, name, skip, key)
|
||||
> MultipartFile downloadArchive(id, name, skip, key)
|
||||
|
||||
|
||||
|
||||
@@ -327,13 +327,13 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final name = name_example; // String |
|
||||
final skip = 8.14; // num |
|
||||
final key = key_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.downloadArchive(albumId, name, skip, key);
|
||||
final result = api_instance.downloadArchive(id, name, skip, key);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->downloadArchive: $e\n');
|
||||
@@ -344,7 +344,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**name** | **String**| | [optional]
|
||||
**skip** | **num**| | [optional]
|
||||
**key** | **String**| | [optional]
|
||||
@@ -416,7 +416,7 @@ This endpoint does not need any parameter.
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **getAlbumInfo**
|
||||
> AlbumResponseDto getAlbumInfo(albumId, key)
|
||||
> AlbumResponseDto getAlbumInfo(id, key)
|
||||
|
||||
|
||||
|
||||
@@ -439,11 +439,11 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final key = key_example; // String |
|
||||
|
||||
try {
|
||||
final result = api_instance.getAlbumInfo(albumId, key);
|
||||
final result = api_instance.getAlbumInfo(id, key);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
|
||||
@@ -454,7 +454,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**key** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
@@ -530,7 +530,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **removeAssetFromAlbum**
|
||||
> AlbumResponseDto removeAssetFromAlbum(albumId, removeAssetsDto)
|
||||
> AlbumResponseDto removeAssetFromAlbum(id, removeAssetsDto)
|
||||
|
||||
|
||||
|
||||
@@ -553,11 +553,11 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
|
||||
|
||||
try {
|
||||
final result = api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
|
||||
final result = api_instance.removeAssetFromAlbum(id, removeAssetsDto);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
|
||||
@@ -568,7 +568,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**removeAssetsDto** | [**RemoveAssetsDto**](RemoveAssetsDto.md)| |
|
||||
|
||||
### Return type
|
||||
@@ -587,7 +587,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **removeUserFromAlbum**
|
||||
> removeUserFromAlbum(albumId, userId)
|
||||
> removeUserFromAlbum(id, userId)
|
||||
|
||||
|
||||
|
||||
@@ -610,11 +610,11 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final userId = userId_example; // String |
|
||||
|
||||
try {
|
||||
api_instance.removeUserFromAlbum(albumId, userId);
|
||||
api_instance.removeUserFromAlbum(id, userId);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->removeUserFromAlbum: $e\n');
|
||||
}
|
||||
@@ -624,7 +624,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**userId** | **String**| |
|
||||
|
||||
### Return type
|
||||
@@ -643,7 +643,7 @@ void (empty response body)
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **updateAlbumInfo**
|
||||
> AlbumResponseDto updateAlbumInfo(albumId, updateAlbumDto)
|
||||
> AlbumResponseDto updateAlbumInfo(id, updateAlbumDto)
|
||||
|
||||
|
||||
|
||||
@@ -666,11 +666,11 @@ import 'package:openapi/api.dart';
|
||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||
|
||||
final api_instance = AlbumApi();
|
||||
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
||||
final updateAlbumDto = UpdateAlbumDto(); // UpdateAlbumDto |
|
||||
|
||||
try {
|
||||
final result = api_instance.updateAlbumInfo(albumId, updateAlbumDto);
|
||||
final result = api_instance.updateAlbumInfo(id, updateAlbumDto);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling AlbumApi->updateAlbumInfo: $e\n');
|
||||
@@ -681,7 +681,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**albumId** | **String**| |
|
||||
**id** | **String**| |
|
||||
**updateAlbumDto** | [**UpdateAlbumDto**](UpdateAlbumDto.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
128
mobile/openapi/lib/api/album_api.dart
generated
128
mobile/openapi/lib/api/album_api.dart
generated
@@ -16,18 +16,18 @@ class AlbumApi {
|
||||
|
||||
final ApiClient apiClient;
|
||||
|
||||
/// Performs an HTTP 'PUT /album/{albumId}/assets' operation and returns the [Response].
|
||||
/// Performs an HTTP 'PUT /album/{id}/assets' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AddAssetsDto] addAssetsDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Response> addAssetsToAlbumWithHttpInfo(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||
Future<Response> addAssetsToAlbumWithHttpInfo(String id, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}/assets'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = addAssetsDto;
|
||||
@@ -56,13 +56,13 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AddAssetsDto] addAssetsDto (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<AddAssetsResponseDto?> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||
final response = await addAssetsToAlbumWithHttpInfo(albumId, addAssetsDto, key: key, );
|
||||
Future<AddAssetsResponseDto?> addAssetsToAlbum(String id, AddAssetsDto addAssetsDto, { String? key, }) async {
|
||||
final response = await addAssetsToAlbumWithHttpInfo(id, addAssetsDto, key: key, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -76,16 +76,16 @@ class AlbumApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PUT /album/{albumId}/users' operation and returns the [Response].
|
||||
/// Performs an HTTP 'PUT /album/{id}/users' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AddUsersDto] addUsersDto (required):
|
||||
Future<Response> addUsersToAlbumWithHttpInfo(String albumId, AddUsersDto addUsersDto,) async {
|
||||
Future<Response> addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}/users'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}/users'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = addUsersDto;
|
||||
@@ -110,11 +110,11 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [AddUsersDto] addUsersDto (required):
|
||||
Future<AlbumResponseDto?> addUsersToAlbum(String albumId, AddUsersDto addUsersDto,) async {
|
||||
final response = await addUsersToAlbumWithHttpInfo(albumId, addUsersDto,);
|
||||
Future<AlbumResponseDto?> addUsersToAlbum(String id, AddUsersDto addUsersDto,) async {
|
||||
final response = await addUsersToAlbumWithHttpInfo(id, addUsersDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -222,14 +222,14 @@ class AlbumApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /album/{albumId}' operation and returns the [Response].
|
||||
/// Performs an HTTP 'DELETE /album/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
Future<Response> deleteAlbumWithHttpInfo(String albumId,) async {
|
||||
/// * [String] id (required):
|
||||
Future<Response> deleteAlbumWithHttpInfo(String id,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
@@ -254,28 +254,28 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
Future<void> deleteAlbum(String albumId,) async {
|
||||
final response = await deleteAlbumWithHttpInfo(albumId,);
|
||||
/// * [String] id (required):
|
||||
Future<void> deleteAlbum(String id,) async {
|
||||
final response = await deleteAlbumWithHttpInfo(id,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /album/{albumId}/download' operation and returns the [Response].
|
||||
/// Performs an HTTP 'GET /album/{id}/download' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [num] skip:
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Response> downloadArchiveWithHttpInfo(String albumId, { String? name, num? skip, String? key, }) async {
|
||||
Future<Response> downloadArchiveWithHttpInfo(String id, { String? name, num? skip, String? key, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}/download'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}/download'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
@@ -310,15 +310,15 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] name:
|
||||
///
|
||||
/// * [num] skip:
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<MultipartFile?> downloadArchive(String albumId, { String? name, num? skip, String? key, }) async {
|
||||
final response = await downloadArchiveWithHttpInfo(albumId, name: name, skip: skip, key: key, );
|
||||
Future<MultipartFile?> downloadArchive(String id, { String? name, num? skip, String? key, }) async {
|
||||
final response = await downloadArchiveWithHttpInfo(id, name: name, skip: skip, key: key, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -373,16 +373,16 @@ class AlbumApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /album/{albumId}' operation and returns the [Response].
|
||||
/// Performs an HTTP 'GET /album/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<Response> getAlbumInfoWithHttpInfo(String albumId, { String? key, }) async {
|
||||
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody;
|
||||
@@ -411,11 +411,11 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] key:
|
||||
Future<AlbumResponseDto?> getAlbumInfo(String albumId, { String? key, }) async {
|
||||
final response = await getAlbumInfoWithHttpInfo(albumId, key: key, );
|
||||
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, }) async {
|
||||
final response = await getAlbumInfoWithHttpInfo(id, key: key, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -492,16 +492,16 @@ class AlbumApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /album/{albumId}/assets' operation and returns the [Response].
|
||||
/// Performs an HTTP 'DELETE /album/{id}/assets' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
||||
Future<Response> removeAssetFromAlbumWithHttpInfo(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
||||
Future<Response> removeAssetFromAlbumWithHttpInfo(String id, RemoveAssetsDto removeAssetsDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}/assets'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}/assets'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = removeAssetsDto;
|
||||
@@ -526,11 +526,11 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [RemoveAssetsDto] removeAssetsDto (required):
|
||||
Future<AlbumResponseDto?> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
|
||||
final response = await removeAssetFromAlbumWithHttpInfo(albumId, removeAssetsDto,);
|
||||
Future<AlbumResponseDto?> removeAssetFromAlbum(String id, RemoveAssetsDto removeAssetsDto,) async {
|
||||
final response = await removeAssetFromAlbumWithHttpInfo(id, removeAssetsDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
@@ -544,16 +544,16 @@ class AlbumApi {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'DELETE /album/{albumId}/user/{userId}' operation and returns the [Response].
|
||||
/// Performs an HTTP 'DELETE /album/{id}/user/{userId}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
Future<Response> removeUserFromAlbumWithHttpInfo(String albumId, String userId,) async {
|
||||
Future<Response> removeUserFromAlbumWithHttpInfo(String id, String userId,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}/user/{userId}'
|
||||
.replaceAll('{albumId}', albumId)
|
||||
final path = r'/album/{id}/user/{userId}'
|
||||
.replaceAll('{id}', id)
|
||||
.replaceAll('{userId}', userId);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
@@ -579,26 +579,26 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [String] userId (required):
|
||||
Future<void> removeUserFromAlbum(String albumId, String userId,) async {
|
||||
final response = await removeUserFromAlbumWithHttpInfo(albumId, userId,);
|
||||
Future<void> removeUserFromAlbum(String id, String userId,) async {
|
||||
final response = await removeUserFromAlbumWithHttpInfo(id, userId,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'PATCH /album/{albumId}' operation and returns the [Response].
|
||||
/// Performs an HTTP 'PATCH /album/{id}' operation and returns the [Response].
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
||||
Future<Response> updateAlbumInfoWithHttpInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
|
||||
Future<Response> updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto,) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/album/{albumId}'
|
||||
.replaceAll('{albumId}', albumId);
|
||||
final path = r'/album/{id}'
|
||||
.replaceAll('{id}', id);
|
||||
|
||||
// ignore: prefer_final_locals
|
||||
Object? postBody = updateAlbumDto;
|
||||
@@ -623,11 +623,11 @@ class AlbumApi {
|
||||
|
||||
/// Parameters:
|
||||
///
|
||||
/// * [String] albumId (required):
|
||||
/// * [String] id (required):
|
||||
///
|
||||
/// * [UpdateAlbumDto] updateAlbumDto (required):
|
||||
Future<AlbumResponseDto?> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
|
||||
final response = await updateAlbumInfoWithHttpInfo(albumId, updateAlbumDto,);
|
||||
Future<AlbumResponseDto?> updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto,) async {
|
||||
final response = await updateAlbumInfoWithHttpInfo(id, updateAlbumDto,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
16
mobile/openapi/test/album_api_test.dart
generated
16
mobile/openapi/test/album_api_test.dart
generated
@@ -17,12 +17,12 @@ void main() {
|
||||
// final instance = AlbumApi();
|
||||
|
||||
group('tests for AlbumApi', () {
|
||||
//Future<AddAssetsResponseDto> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto, { String key }) async
|
||||
//Future<AddAssetsResponseDto> addAssetsToAlbum(String id, AddAssetsDto addAssetsDto, { String key }) async
|
||||
test('test addAssetsToAlbum', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<AlbumResponseDto> addUsersToAlbum(String albumId, AddUsersDto addUsersDto) async
|
||||
//Future<AlbumResponseDto> addUsersToAlbum(String id, AddUsersDto addUsersDto) async
|
||||
test('test addUsersToAlbum', () async {
|
||||
// TODO
|
||||
});
|
||||
@@ -37,12 +37,12 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future deleteAlbum(String albumId) async
|
||||
//Future deleteAlbum(String id) async
|
||||
test('test deleteAlbum', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<MultipartFile> downloadArchive(String albumId, { String name, num skip, String key }) async
|
||||
//Future<MultipartFile> downloadArchive(String id, { String name, num skip, String key }) async
|
||||
test('test downloadArchive', () async {
|
||||
// TODO
|
||||
});
|
||||
@@ -52,7 +52,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<AlbumResponseDto> getAlbumInfo(String albumId, { String key }) async
|
||||
//Future<AlbumResponseDto> getAlbumInfo(String id, { String key }) async
|
||||
test('test getAlbumInfo', () async {
|
||||
// TODO
|
||||
});
|
||||
@@ -62,17 +62,17 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<AlbumResponseDto> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto) async
|
||||
//Future<AlbumResponseDto> removeAssetFromAlbum(String id, RemoveAssetsDto removeAssetsDto) async
|
||||
test('test removeAssetFromAlbum', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future removeUserFromAlbum(String albumId, String userId) async
|
||||
//Future removeUserFromAlbum(String id, String userId) async
|
||||
test('test removeUserFromAlbum', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<AlbumResponseDto> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto) async
|
||||
//Future<AlbumResponseDto> updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto) async
|
||||
test('test updateAlbumInfo', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user