feat: shared links custom URL (#19999)

* feat: custom url for shared links

* feat: use a separate route and query param

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
Jed-Giblin 2025-07-28 14:16:55 -04:00 committed by GitHub
parent 16b14b390f
commit 9b3718120b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 947 additions and 432 deletions

View file

@ -24,7 +24,9 @@ class AlbumsApi {
/// * [BulkIdsDto] bulkIdsDto (required):
///
/// * [String] key:
Future<Response> addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { String? key, }) async {
///
/// * [String] slug:
Future<Response> addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/albums/{id}/assets'
.replaceAll('{id}', id);
@ -39,6 +41,9 @@ class AlbumsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['application/json'];
@ -61,8 +66,10 @@ class AlbumsApi {
/// * [BulkIdsDto] bulkIdsDto (required):
///
/// * [String] key:
Future<List<BulkIdResponseDto>?> addAssetsToAlbum(String id, BulkIdsDto bulkIdsDto, { String? key, }) async {
final response = await addAssetsToAlbumWithHttpInfo(id, bulkIdsDto, key: key, );
///
/// * [String] slug:
Future<List<BulkIdResponseDto>?> addAssetsToAlbum(String id, BulkIdsDto bulkIdsDto, { String? key, String? slug, }) async {
final response = await addAssetsToAlbumWithHttpInfo(id, bulkIdsDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -225,8 +232,10 @@ class AlbumsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [bool] withoutAssets:
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, bool? withoutAssets, }) async {
Future<Response> getAlbumInfoWithHttpInfo(String id, { String? key, String? slug, bool? withoutAssets, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/albums/{id}'
.replaceAll('{id}', id);
@ -241,6 +250,9 @@ class AlbumsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (withoutAssets != null) {
queryParams.addAll(_queryParams('', 'withoutAssets', withoutAssets));
}
@ -265,9 +277,11 @@ class AlbumsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [bool] withoutAssets:
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, bool? withoutAssets, }) async {
final response = await getAlbumInfoWithHttpInfo(id, key: key, withoutAssets: withoutAssets, );
Future<AlbumResponseDto?> getAlbumInfo(String id, { String? key, String? slug, bool? withoutAssets, }) async {
final response = await getAlbumInfoWithHttpInfo(id, key: key, slug: slug, withoutAssets: withoutAssets, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View file

@ -173,7 +173,9 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<Response> downloadAssetWithHttpInfo(String id, { String? key, }) async {
///
/// * [String] slug:
Future<Response> downloadAssetWithHttpInfo(String id, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}/original'
.replaceAll('{id}', id);
@ -188,6 +190,9 @@ class AssetsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>[];
@ -208,8 +213,10 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<MultipartFile?> downloadAsset(String id, { String? key, }) async {
final response = await downloadAssetWithHttpInfo(id, key: key, );
///
/// * [String] slug:
Future<MultipartFile?> downloadAsset(String id, { String? key, String? slug, }) async {
final response = await downloadAssetWithHttpInfo(id, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -289,7 +296,9 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<Response> getAssetInfoWithHttpInfo(String id, { String? key, }) async {
///
/// * [String] slug:
Future<Response> getAssetInfoWithHttpInfo(String id, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}'
.replaceAll('{id}', id);
@ -304,6 +313,9 @@ class AssetsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>[];
@ -324,8 +336,10 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<AssetResponseDto?> getAssetInfo(String id, { String? key, }) async {
final response = await getAssetInfoWithHttpInfo(id, key: key, );
///
/// * [String] slug:
Future<AssetResponseDto?> getAssetInfo(String id, { String? key, String? slug, }) async {
final response = await getAssetInfoWithHttpInfo(id, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -469,7 +483,9 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<Response> playAssetVideoWithHttpInfo(String id, { String? key, }) async {
///
/// * [String] slug:
Future<Response> playAssetVideoWithHttpInfo(String id, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}/video/playback'
.replaceAll('{id}', id);
@ -484,6 +500,9 @@ class AssetsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>[];
@ -504,8 +523,10 @@ class AssetsApi {
/// * [String] id (required):
///
/// * [String] key:
Future<MultipartFile?> playAssetVideo(String id, { String? key, }) async {
final response = await playAssetVideoWithHttpInfo(id, key: key, );
///
/// * [String] slug:
Future<MultipartFile?> playAssetVideo(String id, { String? key, String? slug, }) async {
final response = await playAssetVideoWithHttpInfo(id, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -541,10 +562,12 @@ class AssetsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] duration:
///
/// * [String] filename:
Future<Response> replaceAssetWithHttpInfo(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? duration, String? filename, }) async {
Future<Response> replaceAssetWithHttpInfo(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? duration, String? filename, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}/original'
.replaceAll('{id}', id);
@ -559,6 +582,9 @@ class AssetsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['multipart/form-data'];
@ -628,11 +654,13 @@ class AssetsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] duration:
///
/// * [String] filename:
Future<AssetMediaResponseDto?> replaceAsset(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? duration, String? filename, }) async {
final response = await replaceAssetWithHttpInfo(id, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, key: key, duration: duration, filename: filename, );
Future<AssetMediaResponseDto?> replaceAsset(String id, MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? duration, String? filename, }) async {
final response = await replaceAssetWithHttpInfo(id, assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, key: key, slug: slug, duration: duration, filename: filename, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -791,6 +819,8 @@ class AssetsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] xImmichChecksum:
/// sha1 checksum that can be used for duplicate detection before the file is uploaded
///
@ -805,7 +835,7 @@ class AssetsApi {
/// * [MultipartFile] sidecarData:
///
/// * [AssetVisibility] visibility:
Future<Response> uploadAssetWithHttpInfo(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? xImmichChecksum, String? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, MultipartFile? sidecarData, AssetVisibility? visibility, }) async {
Future<Response> uploadAssetWithHttpInfo(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, String? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, MultipartFile? sidecarData, AssetVisibility? visibility, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets';
@ -819,6 +849,9 @@ class AssetsApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (xImmichChecksum != null) {
headerParams[r'x-immich-checksum'] = parameterToString(xImmichChecksum);
@ -903,6 +936,8 @@ class AssetsApi {
///
/// * [String] key:
///
/// * [String] slug:
///
/// * [String] xImmichChecksum:
/// sha1 checksum that can be used for duplicate detection before the file is uploaded
///
@ -917,8 +952,8 @@ class AssetsApi {
/// * [MultipartFile] sidecarData:
///
/// * [AssetVisibility] visibility:
Future<AssetMediaResponseDto?> uploadAsset(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? xImmichChecksum, String? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, MultipartFile? sidecarData, AssetVisibility? visibility, }) async {
final response = await uploadAssetWithHttpInfo(assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, key: key, xImmichChecksum: xImmichChecksum, duration: duration, filename: filename, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId, sidecarData: sidecarData, visibility: visibility, );
Future<AssetMediaResponseDto?> uploadAsset(MultipartFile assetData, String deviceAssetId, String deviceId, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, String? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, MultipartFile? sidecarData, AssetVisibility? visibility, }) async {
final response = await uploadAssetWithHttpInfo(assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, key: key, slug: slug, xImmichChecksum: xImmichChecksum, duration: duration, filename: filename, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId, sidecarData: sidecarData, visibility: visibility, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -940,7 +975,9 @@ class AssetsApi {
/// * [String] key:
///
/// * [AssetMediaSize] size:
Future<Response> viewAssetWithHttpInfo(String id, { String? key, AssetMediaSize? size, }) async {
///
/// * [String] slug:
Future<Response> viewAssetWithHttpInfo(String id, { String? key, AssetMediaSize? size, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/assets/{id}/thumbnail'
.replaceAll('{id}', id);
@ -958,6 +995,9 @@ class AssetsApi {
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>[];
@ -980,8 +1020,10 @@ class AssetsApi {
/// * [String] key:
///
/// * [AssetMediaSize] size:
Future<MultipartFile?> viewAsset(String id, { String? key, AssetMediaSize? size, }) async {
final response = await viewAssetWithHttpInfo(id, key: key, size: size, );
///
/// * [String] slug:
Future<MultipartFile?> viewAsset(String id, { String? key, AssetMediaSize? size, String? slug, }) async {
final response = await viewAssetWithHttpInfo(id, key: key, size: size, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View file

@ -22,7 +22,9 @@ class DownloadApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<Response> downloadArchiveWithHttpInfo(AssetIdsDto assetIdsDto, { String? key, }) async {
///
/// * [String] slug:
Future<Response> downloadArchiveWithHttpInfo(AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/download/archive';
@ -36,6 +38,9 @@ class DownloadApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['application/json'];
@ -56,8 +61,10 @@ class DownloadApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<MultipartFile?> downloadArchive(AssetIdsDto assetIdsDto, { String? key, }) async {
final response = await downloadArchiveWithHttpInfo(assetIdsDto, key: key, );
///
/// * [String] slug:
Future<MultipartFile?> downloadArchive(AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
final response = await downloadArchiveWithHttpInfo(assetIdsDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -77,7 +84,9 @@ class DownloadApi {
/// * [DownloadInfoDto] downloadInfoDto (required):
///
/// * [String] key:
Future<Response> getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, }) async {
///
/// * [String] slug:
Future<Response> getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/download/info';
@ -91,6 +100,9 @@ class DownloadApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['application/json'];
@ -111,8 +123,10 @@ class DownloadApi {
/// * [DownloadInfoDto] downloadInfoDto (required):
///
/// * [String] key:
Future<DownloadResponseDto?> getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, }) async {
final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, );
///
/// * [String] slug:
Future<DownloadResponseDto?> getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, }) async {
final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View file

@ -24,7 +24,9 @@ class SharedLinksApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<Response> addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
///
/// * [String] slug:
Future<Response> addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/{id}/assets'
.replaceAll('{id}', id);
@ -39,6 +41,9 @@ class SharedLinksApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['application/json'];
@ -61,8 +66,10 @@ class SharedLinksApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<List<AssetIdsResponseDto>?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, key: key, );
///
/// * [String] slug:
Future<List<AssetIdsResponseDto>?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -187,8 +194,10 @@ class SharedLinksApi {
///
/// * [String] password:
///
/// * [String] slug:
///
/// * [String] token:
Future<Response> getMySharedLinkWithHttpInfo({ String? key, String? password, String? token, }) async {
Future<Response> getMySharedLinkWithHttpInfo({ String? key, String? password, String? slug, String? token, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/me';
@ -205,6 +214,9 @@ class SharedLinksApi {
if (password != null) {
queryParams.addAll(_queryParams('', 'password', password));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (token != null) {
queryParams.addAll(_queryParams('', 'token', token));
}
@ -229,9 +241,11 @@ class SharedLinksApi {
///
/// * [String] password:
///
/// * [String] slug:
///
/// * [String] token:
Future<SharedLinkResponseDto?> getMySharedLink({ String? key, String? password, String? token, }) async {
final response = await getMySharedLinkWithHttpInfo( key: key, password: password, token: token, );
Future<SharedLinkResponseDto?> getMySharedLink({ String? key, String? password, String? slug, String? token, }) async {
final response = await getMySharedLinkWithHttpInfo( key: key, password: password, slug: slug, token: token, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -341,7 +355,9 @@ class SharedLinksApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
///
/// * [String] slug:
Future<Response> removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/shared-links/{id}/assets'
.replaceAll('{id}', id);
@ -356,6 +372,9 @@ class SharedLinksApi {
if (key != null) {
queryParams.addAll(_queryParams('', 'key', key));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
const contentTypes = <String>['application/json'];
@ -378,8 +397,10 @@ class SharedLinksApi {
/// * [AssetIdsDto] assetIdsDto (required):
///
/// * [String] key:
Future<List<AssetIdsResponseDto>?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { String? key, }) async {
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, key: key, );
///
/// * [String] slug:
Future<List<AssetIdsResponseDto>?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { String? key, String? slug, }) async {
final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, key: key, slug: slug, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View file

@ -39,6 +39,8 @@ class TimelineApi {
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] slug:
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
@ -53,7 +55,7 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
Future<Response> getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/bucket';
@ -82,6 +84,9 @@ class TimelineApi {
if (personId != null) {
queryParams.addAll(_queryParams('', 'personId', personId));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (tagId != null) {
queryParams.addAll(_queryParams('', 'tagId', tagId));
}
@ -135,6 +140,8 @@ class TimelineApi {
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] slug:
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
@ -149,8 +156,8 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
Future<TimeBucketAssetResponseDto?> getTimeBucket(String timeBucket, { String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -184,6 +191,8 @@ class TimelineApi {
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] slug:
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
@ -198,7 +207,7 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
Future<Response> getTimeBucketsWithHttpInfo({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
// ignore: prefer_const_declarations
final apiPath = r'/timeline/buckets';
@ -227,6 +236,9 @@ class TimelineApi {
if (personId != null) {
queryParams.addAll(_queryParams('', 'personId', personId));
}
if (slug != null) {
queryParams.addAll(_queryParams('', 'slug', slug));
}
if (tagId != null) {
queryParams.addAll(_queryParams('', 'tagId', tagId));
}
@ -276,6 +288,8 @@ class TimelineApi {
/// * [String] personId:
/// Filter assets containing a specific person (face recognition)
///
/// * [String] slug:
///
/// * [String] tagId:
/// Filter assets with a specific tag
///
@ -290,8 +304,8 @@ class TimelineApi {
///
/// * [bool] withStacked:
/// Include stacked assets in the response. When true, only primary assets from stacks are returned.
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
Future<List<TimeBucketsResponseDto>?> getTimeBuckets({ String? albumId, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withPartners, bool? withStacked, }) async {
final response = await getTimeBucketsWithHttpInfo( albumId: albumId, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withPartners: withPartners, withStacked: withStacked, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}