Project

muni

0.03
No release in over 3 years
Low commit activity in last 3 years
A simple NextBus API client for retrieving San Francisco Muni bus route and stop prediction information
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2
>= 0
= 1.9.0

Runtime

 Project Readme

About

muni is a simple NextBus API Client library and command line tool for retrieving San Francisco Muni bus route and stop prediction information.

Install

$ gem install muni

Client Library

Usage

# Find all routes.
Muni::Route.find(:all)
# => [<Muni::Route tag="F" title="F-Market & Wharves">, ...]

# Find a specific route
r21 = Muni::Route.find(21)
# => <Muni::Route directions=[<Muni::Direction id="21_IB1" name="Inbound to Steuart Terminal" ...

# Get a prediction
r21.outbound.stop_at("Hayes and Laguna").predictions
# => [<Muni::Prediction block="2108" delayed="true" dirTag="21_OB4" epochTime="1306877956823" isDeparture="false" minutes="3" seconds="198" ...

CLI

muni includes a basic command-line interface, mostly as example usage of the client library. See bin/muni.

Usage

Tasks:
  muni help [TASK]                         # Describe available tasks or one specific task
  muni list                                # Lists all routes
  muni predict [ROUTE] [DIRECTION] [STOP]  # Retrieve predictions for a route at a specific stop
  muni show [ROUTE_TAG] [DIRECTION]        # Shows a specifc route by name

Contributors