openaq / openaq-api-v2

OpenAQ API
https://api.openaq.org
43 stars 9 forks source link

`order_by=distance` removed and `coordinates` no longer works #7

Closed liamhospiq closed 2 years ago

liamhospiq commented 3 years ago

Not sure if the former part is actually a bug, but I couldn't find any information on it. Was support for order_by=distance removed?

Also, I can no longer get any query involving coordinates to work. I've tried using the UI here too: https://docs.openaq.org/#/v1/locationsv1_get_v1_locations_get.

Sample URL which used to work:

https://api.openaq.org/v1/locations?coordinates=35.8001%2C-78.7119&limit=5&order_by=distance

If you remove order_by=distance it just gives an unspecified server error.

sruti commented 3 years ago

Looks like the implementation of order_by=distance got left out in the API upgrade. Basically, need to replicate what is in the old api locations route to the new locations router.

JuriKiin commented 3 years ago

Is there any update on this? I too am looking for the same order_by=distance that existed in v1!

russbiggs commented 2 years ago

order by distance added in eb77900db23dc68cfee006284b023db83dd8e7ad