feat(web): use time buckets of person detail page (3) (#3557)

* feat: add personId to time bucket endpoints

* chore: open api

* feat(web): time bucket on person detail page
This commit is contained in:
Jason Rasmussen 2023-08-05 09:58:52 -04:00 committed by GitHub
parent 68b5202730
commit ff32506c5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 402 additions and 316 deletions

View file

@ -671,7 +671,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)
# **getByTimeBucket**
> List<AssetResponseDto> getByTimeBucket(size, timeBucket, userId, albumId, isArchived, isFavorite, key)
> List<AssetResponseDto> getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, key)
@ -698,12 +698,13 @@ final size = ; // TimeBucketSize |
final timeBucket = timeBucket_example; // String |
final userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final personId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final isArchived = true; // bool |
final isFavorite = true; // bool |
final key = key_example; // String |
try {
final result = api_instance.getByTimeBucket(size, timeBucket, userId, albumId, isArchived, isFavorite, key);
final result = api_instance.getByTimeBucket(size, timeBucket, userId, albumId, personId, isArchived, isFavorite, key);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getByTimeBucket: $e\n');
@ -718,6 +719,7 @@ Name | Type | Description | Notes
**timeBucket** | **String**| |
**userId** | **String**| | [optional]
**albumId** | **String**| | [optional]
**personId** | **String**| | [optional]
**isArchived** | **bool**| | [optional]
**isFavorite** | **bool**| | [optional]
**key** | **String**| | [optional]
@ -1017,7 +1019,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)
# **getTimeBuckets**
> List<TimeBucketResponseDto> getTimeBuckets(size, userId, albumId, isArchived, isFavorite, key)
> List<TimeBucketResponseDto> getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, key)
@ -1043,12 +1045,13 @@ final api_instance = AssetApi();
final size = ; // TimeBucketSize |
final userId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final albumId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final personId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final isArchived = true; // bool |
final isFavorite = true; // bool |
final key = key_example; // String |
try {
final result = api_instance.getTimeBuckets(size, userId, albumId, isArchived, isFavorite, key);
final result = api_instance.getTimeBuckets(size, userId, albumId, personId, isArchived, isFavorite, key);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getTimeBuckets: $e\n');
@ -1062,6 +1065,7 @@ Name | Type | Description | Notes
**size** | [**TimeBucketSize**](.md)| |
**userId** | **String**| | [optional]
**albumId** | **String**| | [optional]
**personId** | **String**| | [optional]
**isArchived** | **bool**| | [optional]
**isFavorite** | **bool**| | [optional]
**key** | **String**| | [optional]

View file

@ -677,12 +677,14 @@ class AssetApi {
///
/// * [String] albumId:
///
/// * [String] personId:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [String] key:
Future<Response> getByTimeBucketWithHttpInfo(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, bool? isArchived, bool? isFavorite, String? key, }) async {
Future<Response> getByTimeBucketWithHttpInfo(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/asset/time-bucket';
@ -700,6 +702,9 @@ class AssetApi {
if (albumId != null) {
queryParams.addAll(_queryParams('', 'albumId', albumId));
}
if (personId != null) {
queryParams.addAll(_queryParams('', 'personId', personId));
}
if (isArchived != null) {
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
}
@ -735,13 +740,15 @@ class AssetApi {
///
/// * [String] albumId:
///
/// * [String] personId:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [String] key:
Future<List<AssetResponseDto>?> getByTimeBucket(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, bool? isArchived, bool? isFavorite, String? key, }) async {
final response = await getByTimeBucketWithHttpInfo(size, timeBucket, userId: userId, albumId: albumId, isArchived: isArchived, isFavorite: isFavorite, key: key, );
Future<List<AssetResponseDto>?> getByTimeBucket(TimeBucketSize size, String timeBucket, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, String? key, }) async {
final response = await getByTimeBucketWithHttpInfo(size, timeBucket, userId: userId, albumId: albumId, personId: personId, isArchived: isArchived, isFavorite: isFavorite, key: key, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -1056,12 +1063,14 @@ class AssetApi {
///
/// * [String] albumId:
///
/// * [String] personId:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [String] key:
Future<Response> getTimeBucketsWithHttpInfo(TimeBucketSize size, { String? userId, String? albumId, bool? isArchived, bool? isFavorite, String? key, }) async {
Future<Response> getTimeBucketsWithHttpInfo(TimeBucketSize size, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, String? key, }) async {
// ignore: prefer_const_declarations
final path = r'/asset/time-buckets';
@ -1079,6 +1088,9 @@ class AssetApi {
if (albumId != null) {
queryParams.addAll(_queryParams('', 'albumId', albumId));
}
if (personId != null) {
queryParams.addAll(_queryParams('', 'personId', personId));
}
if (isArchived != null) {
queryParams.addAll(_queryParams('', 'isArchived', isArchived));
}
@ -1111,13 +1123,15 @@ class AssetApi {
///
/// * [String] albumId:
///
/// * [String] personId:
///
/// * [bool] isArchived:
///
/// * [bool] isFavorite:
///
/// * [String] key:
Future<List<TimeBucketResponseDto>?> getTimeBuckets(TimeBucketSize size, { String? userId, String? albumId, bool? isArchived, bool? isFavorite, String? key, }) async {
final response = await getTimeBucketsWithHttpInfo(size, userId: userId, albumId: albumId, isArchived: isArchived, isFavorite: isFavorite, key: key, );
Future<List<TimeBucketResponseDto>?> getTimeBuckets(TimeBucketSize size, { String? userId, String? albumId, String? personId, bool? isArchived, bool? isFavorite, String? key, }) async {
final response = await getTimeBucketsWithHttpInfo(size, userId: userId, albumId: albumId, personId: personId, isArchived: isArchived, isFavorite: isFavorite, key: key, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}

View file

@ -82,7 +82,7 @@ void main() {
// TODO
});
//Future<List<AssetResponseDto>> getByTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, bool isArchived, bool isFavorite, String key }) async
//Future<List<AssetResponseDto>> getByTimeBucket(TimeBucketSize size, String timeBucket, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, String key }) async
test('test getByTimeBucket', () async {
// TODO
});
@ -112,7 +112,7 @@ void main() {
// TODO
});
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, bool isArchived, bool isFavorite, String key }) async
//Future<List<TimeBucketResponseDto>> getTimeBuckets(TimeBucketSize size, { String userId, String albumId, String personId, bool isArchived, bool isFavorite, String key }) async
test('test getTimeBuckets', () async {
// TODO
});