No commit activity in last 3 years
No release in over 3 years
Read and write public-transit identities to the Onestop ID Registry/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.5
~> 0.10
~> 10.0
~> 3.2
~> 0.9
~> 2.9
~> 1.20

Runtime

~> 1.2
~> 1.0
 Project Readme

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)