File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
stac_fastapi/pgstac/stac_fastapi/pgstac Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,8 @@ async def _get_base_item(collection_id: str) -> Dict[str, Any]:
248
248
async def item_collection (
249
249
self ,
250
250
collection_id : str ,
251
+ bbox : Optional [List [NumType ]] = None ,
252
+ datetime : Optional [Union [str , datetime ]] = None ,
251
253
limit : Optional [int ] = None ,
252
254
token : str = None ,
253
255
** kwargs ,
@@ -267,8 +269,21 @@ async def item_collection(
267
269
# If collection does not exist, NotFoundError wil be raised
268
270
await self .get_collection (collection_id , ** kwargs )
269
271
272
+ base_args = {
273
+ "collections" : [collection_id ],
274
+ "bbox" : bbox ,
275
+ "datetime" : datetime ,
276
+ "limit" : limit ,
277
+ "token" : token ,
278
+ }
279
+
280
+ clean = {}
281
+ for k , v in base_args .items ():
282
+ if v is not None and v != []:
283
+ clean [k ] = v
284
+
270
285
req = self .post_request_model (
271
- collections = [ collection_id ], limit = limit , token = token
286
+ ** clean ,
272
287
)
273
288
item_collection = await self ._search_base (req , ** kwargs )
274
289
links = await CollectionLinks (
You can’t perform that action at this time.
0 commit comments