Skip to content

Clojure library for retrieving data from the CTA API

License

Notifications You must be signed in to change notification settings

dpassen/intransit

Repository files navigation

intransit

https://github.com/dpassen/intransit/actions/workflows/test.yaml/badge.svg https://github.com/dpassen/intransit/actions/workflows/lint.yaml/badge.svg https://github.com/dpassen/intransit/actions/workflows/check.yaml/badge.svg https://github.com/dpassen/intransit/actions/workflows/editorconfig.yaml/badge.svg https://img.shields.io/clojars/dt/org.passen/intransit.svg?color=opal

A Clojure library designed to aid in retrieving data from the CTA API

Latest version

intransit is deployed to Clojars

https://img.shields.io/clojars/v/org.passen/intransit.svg

Usage

(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

License

Copyright © 2016-2024 Derek Passen

Released under an MIT license.

About

Clojure library for retrieving data from the CTA API

Resources

License

Stars

Watchers

Forks

Packages

No packages published