* feat(server/web): download entire album as zip archive * fix: remove duplicate API call * disable ZIP compression (images are already compressed)
16 KiB
openapi.api.AlbumApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
addAssetsToAlbum | PUT /album/{albumId}/assets | |
addUsersToAlbum | PUT /album/{albumId}/users | |
createAlbum | POST /album | |
deleteAlbum | DELETE /album/{albumId} | |
downloadArchive | GET /album/{albumId}/download | |
getAlbumCountByUserId | GET /album/count-by-user-id | |
getAlbumInfo | GET /album/{albumId} | |
getAllAlbums | GET /album | |
removeAssetFromAlbum | DELETE /album/{albumId}/assets | |
removeUserFromAlbum | DELETE /album/{albumId}/user/{userId} | |
updateAlbumInfo | PATCH /album/{albumId} |
addAssetsToAlbum
AddAssetsResponseDto addAssetsToAlbum(albumId, addAssetsDto)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
try {
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String | ||
addAssetsDto | AddAssetsDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
addUsersToAlbum
AlbumResponseDto addUsersToAlbum(albumId, addUsersDto)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final addUsersDto = AddUsersDto(); // AddUsersDto |
try {
final result = api_instance.addUsersToAlbum(albumId, addUsersDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addUsersToAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String | ||
addUsersDto | AddUsersDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createAlbum
AlbumResponseDto createAlbum(createAlbumDto)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final createAlbumDto = CreateAlbumDto(); // CreateAlbumDto |
try {
final result = api_instance.createAlbum(createAlbumDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->createAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createAlbumDto | CreateAlbumDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAlbum
deleteAlbum(albumId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
try {
api_instance.deleteAlbum(albumId);
} catch (e) {
print('Exception when calling AlbumApi->deleteAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
downloadArchive
Object downloadArchive(albumId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
try {
final result = api_instance.downloadArchive(albumId);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->downloadArchive: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAlbumCountByUserId
AlbumCountResponseDto getAlbumCountByUserId()
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
try {
final result = api_instance.getAlbumCountByUserId();
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAlbumCountByUserId: $e\n');
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAlbumInfo
AlbumResponseDto getAlbumInfo(albumId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
try {
final result = api_instance.getAlbumInfo(albumId);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAllAlbums
List getAllAlbums(shared, assetId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final shared = true; // bool |
final assetId = assetId_example; // String | Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
try {
final result = api_instance.getAllAlbums(shared, assetId);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAllAlbums: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
shared | bool | [optional] | |
assetId | String | Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeAssetFromAlbum
AlbumResponseDto removeAssetFromAlbum(albumId, removeAssetsDto)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
try {
final result = api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String | ||
removeAssetsDto | RemoveAssetsDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeUserFromAlbum
removeUserFromAlbum(albumId, userId)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final userId = userId_example; // String |
try {
api_instance.removeUserFromAlbum(albumId, userId);
} catch (e) {
print('Exception when calling AlbumApi->removeUserFromAlbum: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String | ||
userId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAlbumInfo
AlbumResponseDto updateAlbumInfo(albumId, updateAlbumDto)
Example
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final updateAlbumDto = UpdateAlbumDto(); // UpdateAlbumDto |
try {
final result = api_instance.updateAlbumInfo(albumId, updateAlbumDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->updateAlbumInfo: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
albumId | String | ||
updateAlbumDto | UpdateAlbumDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]