mirror of
https://github.com/immich-app/immich.git
synced 2024-12-17 12:22:31 +02:00
8a6889529c
* feat(server,web,mobile): Add optional password option for share links. Signed-off-by: jarvis2f <137974272+jarvis2f@users.noreply.github.com> * feat(server,web): Update shared-link.controller and page.svelte for improved cookie handling and metadata updates. Signed-off-by: jarvis2f <137974272+jarvis2f@users.noreply.github.com> --------- Signed-off-by: jarvis2f <137974272+jarvis2f@users.noreply.github.com>
471 lines
17 KiB
Markdown
Generated
471 lines
17 KiB
Markdown
Generated
# openapi.api.SharedLinkApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
```
|
|
|
|
All URIs are relative to */api*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**addSharedLinkAssets**](SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-link/{id}/assets |
|
|
[**createSharedLink**](SharedLinkApi.md#createsharedlink) | **POST** /shared-link |
|
|
[**getAllSharedLinks**](SharedLinkApi.md#getallsharedlinks) | **GET** /shared-link |
|
|
[**getMySharedLink**](SharedLinkApi.md#getmysharedlink) | **GET** /shared-link/me |
|
|
[**getSharedLinkById**](SharedLinkApi.md#getsharedlinkbyid) | **GET** /shared-link/{id} |
|
|
[**removeSharedLink**](SharedLinkApi.md#removesharedlink) | **DELETE** /shared-link/{id} |
|
|
[**removeSharedLinkAssets**](SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets |
|
|
[**updateSharedLink**](SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} |
|
|
|
|
|
|
# **addSharedLinkAssets**
|
|
> List<AssetIdsResponseDto> addSharedLinkAssets(id, assetIdsDto, key)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
final assetIdsDto = AssetIdsDto(); // AssetIdsDto |
|
|
final key = key_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.addSharedLinkAssets(id, assetIdsDto, key);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->addSharedLinkAssets: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
**assetIdsDto** | [**AssetIdsDto**](AssetIdsDto.md)| |
|
|
**key** | **String**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<AssetIdsResponseDto>**](AssetIdsResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **createSharedLink**
|
|
> SharedLinkResponseDto createSharedLink(sharedLinkCreateDto)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final sharedLinkCreateDto = SharedLinkCreateDto(); // SharedLinkCreateDto |
|
|
|
|
try {
|
|
final result = api_instance.createSharedLink(sharedLinkCreateDto);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->createSharedLink: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**sharedLinkCreateDto** | [**SharedLinkCreateDto**](SharedLinkCreateDto.md)| |
|
|
|
|
### Return type
|
|
|
|
[**SharedLinkResponseDto**](SharedLinkResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **getAllSharedLinks**
|
|
> List<SharedLinkResponseDto> getAllSharedLinks()
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
|
|
try {
|
|
final result = api_instance.getAllSharedLinks();
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->getAllSharedLinks: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**List<SharedLinkResponseDto>**](SharedLinkResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **getMySharedLink**
|
|
> SharedLinkResponseDto getMySharedLink(password, token, key)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final password = password; // String |
|
|
final token = token_example; // String |
|
|
final key = key_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.getMySharedLink(password, token, key);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->getMySharedLink: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**password** | **String**| | [optional]
|
|
**token** | **String**| | [optional]
|
|
**key** | **String**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**SharedLinkResponseDto**](SharedLinkResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **getSharedLinkById**
|
|
> SharedLinkResponseDto getSharedLinkById(id)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
|
|
try {
|
|
final result = api_instance.getSharedLinkById(id);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->getSharedLinkById: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
|
|
### Return type
|
|
|
|
[**SharedLinkResponseDto**](SharedLinkResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **removeSharedLink**
|
|
> removeSharedLink(id)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
|
|
try {
|
|
api_instance.removeSharedLink(id);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->removeSharedLink: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
|
|
### Return type
|
|
|
|
void (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
[[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)
|
|
|
|
# **removeSharedLinkAssets**
|
|
> List<AssetIdsResponseDto> removeSharedLinkAssets(id, assetIdsDto, key)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
final assetIdsDto = AssetIdsDto(); // AssetIdsDto |
|
|
final key = key_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.removeSharedLinkAssets(id, assetIdsDto, key);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->removeSharedLinkAssets: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
**assetIdsDto** | [**AssetIdsDto**](AssetIdsDto.md)| |
|
|
**key** | **String**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**List<AssetIdsResponseDto>**](AssetIdsResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **updateSharedLink**
|
|
> SharedLinkResponseDto updateSharedLink(id, sharedLinkEditDto)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:openapi/api.dart';
|
|
// TODO Configure API key authorization: cookie
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
|
|
// TODO Configure API key authorization: api_key
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
|
|
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
|
|
// 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 = SharedLinkApi();
|
|
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
|
|
final sharedLinkEditDto = SharedLinkEditDto(); // SharedLinkEditDto |
|
|
|
|
try {
|
|
final result = api_instance.updateSharedLink(id, sharedLinkEditDto);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling SharedLinkApi->updateSharedLink: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **String**| |
|
|
**sharedLinkEditDto** | [**SharedLinkEditDto**](SharedLinkEditDto.md)| |
|
|
|
|
### Return type
|
|
|
|
[**SharedLinkResponseDto**](SharedLinkResponseDto.md)
|
|
|
|
### Authorization
|
|
|
|
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|