A Clojure library designed to aid in retrieving data from the CTA API
intransit is deployed to Clojars
(require '[org.passen.intransit.core :as intransit])
(intransit/arrivals api-key)
(intransit/arrivals api-key {:max-results 50})
(intransit/arrivals api-key :max-results 50)
(intransit/arrivals api-key {:station-id station-id})
(intransit/arrivals api-key :station-id station-id)
(intransit/arrivals api-key {:station-id station-id :route route})
(intransit/arrivals api-key :station-id station-id :route route)
(intransit/arrivals api-key {:stop-id stop-id})
(intransit/arrivals api-key :stop-id stop-id)
(intransit/arrivals api-key {:stop-id stop-id :route route})
(intransit/arrivals api-key :stop-id stop-id :route route)
(intransit/arrivals api-key {:station-id station-id :stop-id stop-id})
(intransit/arrivals api-key :station-id station-id :stop-id stop-id)
;; or any other combination of these parameters
(intransit/follow api-key {:run-number run-number})
(intransit/follow api-key :run-number run-number)
(intransit/positions api-key ["g"])
(intransit/positions api-key [:G])
(intransit/positions api-key ["g" :p "OrG" :RED])
;; or any other exotic capitalizations
Copyright © 2016-2024 Derek Passen
Released under an MIT license.