Created
November 1, 2019 15:49
-
-
Save rvanlaar/7a328915f7a0997297edcea4bc05e024 to your computer and use it in GitHub Desktop.
Fetch available OV-fietsen around Amsterdam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Required curl and jq: https://github.com/stedolan/jq | |
function fetch() { | |
echo -n "$1" | |
curl -s https://www.ns.nl/rio-station-information-api/ovfiets/$2/summary |jq .availableBikes | |
} | |
fetch "Centraal: " asd | |
fetch "Amstel: " asa | |
fetch "BijlmerArena: " asb | |
fetch "Zuid: " asdz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment