Project

nextbus

0.01
No commit activity in last 3 years
No release in over 3 years
NextBus API client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.9.7
>= 0.10.3

Runtime

= 0.1.8
= 0.5.2
 Project Readme

nextbus

A simple client for the NextBus API, including arrival predictions for public transportation based on "real-time" data. As of this writing, data is available for the San Francisco Muni, Portland Streetcar, Massachusetts Institute of Technology and MBTA.

Installation

As simple as:

gem install nextbus

Sample Usage

require 'rubygems'
require 'nextbus'
Nextbus::Agency.all
# => [#<Nextbus::Agency:0x1050428 @tag="mbta", @region_title="Massachusetts", @title="MBTA">, ...]
Nextbus::Agency.find('mbta')
# => #<Nextbus::Agency:0x10256d8 @tag="mbta", @region_title="Massachusetts", @title="MBTA">
Nextbus::Route.all('mbta')
# => [#<Nextbus::Route:0x5440c0 @tag="39", @title="39">, ...]
Nextbus::Stop.all('mbta', '39', 'out')
# => [#<Nextbus::Stop:0x1c3bd78 @tag="23391">, ...]
Nextbus::Prediction.all('mbta', '39', '23391')
# => [#<Nextbus::Prediction:0x1cfaebc @time=Wed Feb 24 09:24:00 -0500 2010>, ...]

Copyright

nextbus is Copyright (c) 2010 Greg Sterndale. See LICENSE for details.

The nextbus gem is not affiliated with NextBus, Inc.