This is a script to return all DriveNow car locations for Berlin, Germany. It is easily changed to work with any other city DriveNow provides service in.
You need a DriveNow API key and auth token. It's easiest to get your's by logging into the DriveNow website and using your browser's dev tools.
$ git clone git@gist.github.com:ba51ec4285171b6c393e5dba22ba0ac7.git drivenow
$ cd drivenow
$ chmod +x ./drivenow_car_coordinates.sh
$ DRIVENOW_API_KEY=abc DRIVENOW_AUTH_TOKEN=123 ./drivenow_car_coordinates.sh | jq
[
{
"latitude": 52.519503,
"longitude": 13.405613,
"address": [
"Spandauer Str. 9",
"10178 Berlin"
]
},
...
{
"latitude": 52.500897,
"longitude": 13.420673,
"address": [
"Oranienstraße 183",
"10999 Berlin"
]
}
]