Skip to content

Instantly share code, notes, and snippets.

@segabor
Created February 22, 2019 17:05
Show Gist options
  • Save segabor/a224874452eabcb9ca626a636ad2a78a to your computer and use it in GitHub Desktop.
Save segabor/a224874452eabcb9ca626a636ad2a78a to your computer and use it in GitHub Desktop.
#!/bin/bash
today=$(date +%Y%m%d)
stopId='BKK_F04217'
curl -s "http://futar.bkk.hu/bkk-utvonaltervezo-api/ws/otp/api/where/schedule-for-stop.json?key=apaiary-test&version=3&ap
pVersion=apiary-1.0&includeReferences=false&stopId=${stopId}&onlyDepartures=true&date=${today}" \
| jq -e '.data.entry.schedules[] | .directions[] | select(.directionId == "1") | .stopTimes[]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment