This Ruby library wraps the Transitland Datastore API, which allows querying of feeds, stops, routes, and other public-transit data from around the world
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
CHANGELOG.md
Gemfile
LICENSE.txt
README.md
Rakefile
circle.yml
transitland_client.gemspec

README.md

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)