I made the /timelapse endpoint work for any global, raster dataset (as opposed to just no2-mean and no2-diff).
How I did it:
I added a field for datasetId in the query parameters. The API validate that the dataset indeed a raster dataset.
I added a field for spotlightId in the query parameters in order to make the /timelapse endpoint also work with non-global datasets. This functionality is not currently supported by the frontend, since the timelapse requests are generated by drawing a bounding box on the map - which has no knowledge of which "spotlight" it might be over. A potential workaround is for the API to calculate if the bounding box supplied fits within a spotlight's tile, returning an error if it does not. For the time being, the endpoint will only support global datasets.
**Note: the field month is now date in order to support both monthly datasets and daily datasets
Closes #110
What I did:
I made the
/timelapse
endpoint work for any global, raster dataset (as opposed to justno2-mean
andno2-diff
).How I did it:
I added a field for
datasetId
in the query parameters. The API validate that the dataset indeed a raster dataset.I added a field for
spotlightId
in the query parameters in order to make the/timelapse
endpoint also work with non-global datasets. This functionality is not currently supported by the frontend, since the timelapse requests are generated by drawing a bounding box on the map - which has no knowledge of which "spotlight" it might be over. A potential workaround is for the API to calculate if the bounding box supplied fits within a spotlight's tile, returning an error if it does not. For the time being, the endpoint will only supportglobal
datasets.**Note: the field
month
is nowdate
in order to support both monthly datasets and daily datasetsHow you can test it:
Executing the following query:
returns:
Example of a spotlight-specific dataset query:
returns:
Note the field
spotlightId
in the request.Examples of handled failures:
Invalid date format:
returns:
Other handled failures include: