Skip to content

This Ruby library wraps the Transitland Datastore API, which allows querying of feeds, stops, routes, and other public-transit data from around the world

License

Notifications You must be signed in to change notification settings

transitland/transitland-ruby-client

Repository files navigation

transitland-(ruby)-client

Circle CI Gem Version

MIGRATION WARNING. As of March 2016, this client library is being updated to work with Transitland's Datastore API. It will be broken in the meantime. Thank you for your patience!

Installation

These instructions assume you already have a Ruby 2.0+ interpreter available for local use.

Add this line to your application's Gemfile:

gem 'transitland_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install transitland_client

Usage

This library is intended for use within other software and services. It also includes its own console, which lets developers try functionality locally.

To start the console:

bundle exec rake console

To find a single feed by its Onestop ID:

[1] pry(main)> TransitlandClient::Feed.find_by(onestop_id: 'f-9q9-caltrain')

To get the URL for a feed:

[2] pry(main)> TransitlandClient::Feed.find_by(onestop_id: 'f-9q9-caltrain').get(:url)

About

This Ruby library wraps the Transitland Datastore API, which allows querying of feeds, stops, routes, and other public-transit data from around the world

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages