You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-09 23:17:29 +02:00
feat(server): provide the ability to search archived photos (#6332)
* Feat: provide the ability to search archived photos Adds a query parameter (`searchArchived`) to the search URL parameters to allow the results to contain archived photos. * chore: rename includeArchived => withArchived * chore: open api --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
6
mobile/openapi/doc/SearchApi.md
generated
6
mobile/openapi/doc/SearchApi.md
generated
@@ -66,7 +66,7 @@ This endpoint does not need any parameter.
|
||||
[[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)
|
||||
|
||||
# **search**
|
||||
> SearchResponseDto search(q, query, clip, type, recent, motion)
|
||||
> SearchResponseDto search(q, query, clip, type, recent, motion, withArchived)
|
||||
|
||||
|
||||
|
||||
@@ -95,9 +95,10 @@ final clip = true; // bool |
|
||||
final type = type_example; // String |
|
||||
final recent = true; // bool |
|
||||
final motion = true; // bool |
|
||||
final withArchived = true; // bool |
|
||||
|
||||
try {
|
||||
final result = api_instance.search(q, query, clip, type, recent, motion);
|
||||
final result = api_instance.search(q, query, clip, type, recent, motion, withArchived);
|
||||
print(result);
|
||||
} catch (e) {
|
||||
print('Exception when calling SearchApi->search: $e\n');
|
||||
@@ -114,6 +115,7 @@ Name | Type | Description | Notes
|
||||
**type** | **String**| | [optional]
|
||||
**recent** | **bool**| | [optional]
|
||||
**motion** | **bool**| | [optional]
|
||||
**withArchived** | **bool**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
13
mobile/openapi/lib/api/search_api.dart
generated
13
mobile/openapi/lib/api/search_api.dart
generated
@@ -74,7 +74,9 @@ class SearchApi {
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [bool] motion:
|
||||
Future<Response> searchWithHttpInfo({ String? q, String? query, bool? clip, String? type, bool? recent, bool? motion, }) async {
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<Response> searchWithHttpInfo({ String? q, String? query, bool? clip, String? type, bool? recent, bool? motion, bool? withArchived, }) async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/search';
|
||||
|
||||
@@ -103,6 +105,9 @@ class SearchApi {
|
||||
if (motion != null) {
|
||||
queryParams.addAll(_queryParams('', 'motion', motion));
|
||||
}
|
||||
if (withArchived != null) {
|
||||
queryParams.addAll(_queryParams('', 'withArchived', withArchived));
|
||||
}
|
||||
|
||||
const contentTypes = <String>[];
|
||||
|
||||
@@ -131,8 +136,10 @@ class SearchApi {
|
||||
/// * [bool] recent:
|
||||
///
|
||||
/// * [bool] motion:
|
||||
Future<SearchResponseDto?> search({ String? q, String? query, bool? clip, String? type, bool? recent, bool? motion, }) async {
|
||||
final response = await searchWithHttpInfo( q: q, query: query, clip: clip, type: type, recent: recent, motion: motion, );
|
||||
///
|
||||
/// * [bool] withArchived:
|
||||
Future<SearchResponseDto?> search({ String? q, String? query, bool? clip, String? type, bool? recent, bool? motion, bool? withArchived, }) async {
|
||||
final response = await searchWithHttpInfo( q: q, query: query, clip: clip, type: type, recent: recent, motion: motion, withArchived: withArchived, );
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
2
mobile/openapi/test/search_api_test.dart
generated
2
mobile/openapi/test/search_api_test.dart
generated
@@ -22,7 +22,7 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
//Future<SearchResponseDto> search({ String q, String query, bool clip, String type, bool recent, bool motion }) async
|
||||
//Future<SearchResponseDto> search({ String q, String query, bool clip, String type, bool recent, bool motion, bool withArchived }) async
|
||||
test('test search', () async {
|
||||
// TODO
|
||||
});
|
||||
|
Reference in New Issue
Block a user