2.2.1 • Published 1 month ago

hubot-nextbus v2.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
1 month ago

Hubot Nextbus

npm version Node CI

This Hubot package works with gtfs-rails-api. You provide an endpoint along with a latitude and longitude for it to obtain the next expected bus to a particular set of nearby stops.

Installation

In your hubot repository, run:

npm install hubot-nextbus --save

Then add hubot-nextbus to your external-scripts.json:

["hubot-nextbus"]

Configuration

Environment VariableOptionalDescription
HUBOT_NEXTBUS_LAT_LONNoDefault location for hubot nextbus, separated by a comma. (e.g. 36.1629191,-86.7813481)
HUBOT_NEXTBUS_STOP_IDYesSpecific identifier to use with hubot nextbus; if not set, falls back to latitude/longitude
HUBOT_NEXTBUS_BASE_URLYesURL of a gtfs-rails-api instance; Defaults to Nashville, TN.

Usage

hubot nextbus

Returns the next bus for the nearest stop.

user> hubot nextbus
hubot> Upcoming Trips for [CHA7AWN] CHARLOTTE AVE & 7TH AVE N WB
  7:01 AM   #50 - CHARLOTTE WALMART            in a minute    
  7:15 AM   #17 - GREEN HILLS VIA 12TH AVE S   in 16 minutes  
  7:16 AM   #50 - CHARLOTTE WALMART            in 16 minutes  
  7:31 AM   #50 - CHARLOTTE WALMART            in 31 minutes  
  7:35 AM   #17 - GREEN HILLS VIA 12TH AVE S   in 36 minutes  

hubot nextbus stops

Get the list of stops nearby your configured latitude and longitude.

user> hubot nextbus stops
hubot> List of nearby stops:
hubot> - [CHA7AWN] CHARLOTTE AVE & 7TH AVE N WB
- [CHA7AEN] CHARLOTTE AVE & 7TH AVE N EB
- [6AVDEASN] 6TH AVE & DEADERICK ST SB
- [6AVDEANN] 6TH AVE N & DEADERICK ST NB
- [UNI7AWN] UNION ST & 7TH AVE N WB

hubot nextbus stop <stop id>

Returns the next bus for a given stop ID.

user> hubot nextbus stop PORGRENN
hubot> Upcoming Trips for [PORGRENN] PORTER RD & GREENWOOD AVE NB
  10:34 PM   #4 - INGLEWOOD   in 25 minutes  
  11:34 PM   #4 - INGLEWOOD   in an hour     
  12:32 AM   #4 - INGLEWOOD   in 2 hours 
2.2.1

1 month ago

2.2.0

4 months ago

2.1.4

5 months ago

2.1.3

11 months ago

2.1.2

1 year ago

2.1.1

2 years ago

2.0.2

2 years ago

2.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

9 years ago

0.0.1

9 years ago