cityofaustin / atd-micromobility-api

A dockless mobility data API built with Python/Sanic
12 stars 4 forks source link

Restore mode handling #37

Closed johnclary closed 5 years ago

johnclary commented 5 years ago

Fixes #36.

Restores support for handling a mode parameter, which can be defined as scooter, bicycle, or all. If no mode parameter is specified, all is used by default. Support for mode was accidently dropped when transitioning to the Socrata back end.

We're also changing how the mode is parsed when it is specified as all (or is absent). Previously, we were setting the mode internally to total rather than all, because total matched the key value in the static, pre-aggregated grid data we were using as a source database. With this switch to Socrata querying, it's no longer necessary to have a total key in the queried data, and so we can leave all as-is.