transitland-(ruby)-client
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)