* Added interaction to select multiple thumbnail * Fixed stutter transition * Return AlbumResponseDto after removing an asset from album * Render correctly when an array of thumbnail is updated * Fixed wording * Added native dialog for removing users from album * Fixed rendering incorrect profile image on share user select dialog
13 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} | |
getAlbumInfo | GET /album/{albumId} | |
getAllAlbums | GET /album | |
removeAssetFromAlbum | DELETE /album/{albumId}/assets | |
removeUserFromAlbum | DELETE /album/{albumId}/user/{userId} | |
updateAlbumInfo | PATCH /album/{albumId} |
addAssetsToAlbum
AlbumResponseDto 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]
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)
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 |
try {
final result = api_instance.getAllAlbums(shared);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAllAlbums: $e\n');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
shared | bool | [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]