@@ -54,8 +54,7 @@ async def all_collections( # noqa: C901
54
54
sortby : Optional [str ] = None ,
55
55
filter_expr : Optional [str ] = None ,
56
56
filter_lang : Optional [str ] = None ,
57
- q : Optional [Union [str , List [str ]]] = None ,
58
- ** kwargs ,
57
+ ** kwargs : Any ,
59
58
) -> Collections :
60
59
"""Cross catalog search (GET).
61
60
@@ -86,7 +85,7 @@ async def all_collections( # noqa: C901
86
85
sortby = sortby ,
87
86
filter_query = filter_expr ,
88
87
filter_lang = filter_lang ,
89
- q = q ,
88
+ ** kwargs ,
90
89
)
91
90
92
91
async with request .app .state .get_connection (request , "r" ) as conn :
@@ -157,7 +156,10 @@ async def all_collections( # noqa: C901
157
156
)
158
157
159
158
async def get_collection (
160
- self , collection_id : str , request : Request , ** kwargs
159
+ self ,
160
+ collection_id : str ,
161
+ request : Request ,
162
+ ** kwargs : Any ,
161
163
) -> Collection :
162
164
"""Get collection by id.
163
165
@@ -202,7 +204,9 @@ async def get_collection(
202
204
return Collection (** collection )
203
205
204
206
async def _get_base_item (
205
- self , collection_id : str , request : Request
207
+ self ,
208
+ collection_id : str ,
209
+ request : Request ,
206
210
) -> Dict [str , Any ]:
207
211
"""Get the base item of a collection for use in rehydrating full item collection properties.
208
212
@@ -359,7 +363,7 @@ async def item_collection(
359
363
filter_expr : Optional [str ] = None ,
360
364
filter_lang : Optional [str ] = None ,
361
365
token : Optional [str ] = None ,
362
- ** kwargs ,
366
+ ** kwargs : Any ,
363
367
) -> ItemCollection :
364
368
"""Get all items from a specific collection.
365
369
@@ -391,6 +395,7 @@ async def item_collection(
391
395
filter_lang = filter_lang ,
392
396
fields = fields ,
393
397
sortby = sortby ,
398
+ ** kwargs ,
394
399
)
395
400
396
401
try :
@@ -417,7 +422,11 @@ async def item_collection(
417
422
return ItemCollection (** item_collection )
418
423
419
424
async def get_item (
420
- self , item_id : str , collection_id : str , request : Request , ** kwargs
425
+ self ,
426
+ item_id : str ,
427
+ collection_id : str ,
428
+ request : Request ,
429
+ ** kwargs : Any ,
421
430
) -> Item :
422
431
"""Get item by id.
423
432
@@ -445,7 +454,10 @@ async def get_item(
445
454
return Item (** item_collection ["features" ][0 ])
446
455
447
456
async def post_search (
448
- self , search_request : PgstacSearch , request : Request , ** kwargs
457
+ self ,
458
+ search_request : PgstacSearch ,
459
+ request : Request ,
460
+ ** kwargs : Any ,
449
461
) -> ItemCollection :
450
462
"""Cross catalog search (POST).
451
463
@@ -489,7 +501,7 @@ async def get_search(
489
501
filter_expr : Optional [str ] = None ,
490
502
filter_lang : Optional [str ] = None ,
491
503
token : Optional [str ] = None ,
492
- ** kwargs ,
504
+ ** kwargs : Any ,
493
505
) -> ItemCollection :
494
506
"""Cross catalog search (GET).
495
507
@@ -516,6 +528,7 @@ async def get_search(
516
528
sortby = sortby ,
517
529
filter_query = filter_expr ,
518
530
filter_lang = filter_lang ,
531
+ ** kwargs ,
519
532
)
520
533
521
534
try :
@@ -551,6 +564,7 @@ def _clean_search_args( # noqa: C901
551
564
filter_query : Optional [str ] = None ,
552
565
filter_lang : Optional [str ] = None ,
553
566
q : Optional [Union [str , List [str ]]] = None ,
567
+ ** kwargs : Any ,
554
568
) -> Dict [str , Any ]:
555
569
"""Clean up search arguments to match format expected by pgstac"""
556
570
if filter_query :
0 commit comments