hubot-radbus
RadBus API integration for Hubot
Last updated 5 years ago by twistedstream .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-radbus 
SYNC missed versions from official npm registry.

hubot-radbus

RadBus API integration for Hubot

Build Status

Reports to the current user what their upcoming bus times are using the RadBus API. If it's AM, they get times for their buses heading into the office. Likewise, if it's PM, they get times for buses that will take them home.

NOTE: RadBus currently only works in the Twin Cities (Minneapolis/St. Paul, MN) area.

Installation

NPM

In your Hubot repository, run:

npm install hubot-radbus --save

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

["hubot-radbus"]

Configuration

RadBus requires a bit of configuration to get everything working:

  • HUBOT_RADBUS_TIMEZONE - Set to America/Chicago since RadBus only supports the Twin Cities metro area, which is in the Chicago timezone
  • HUBOT_RADBUS_API_BASE_URL - Set to https://api.radbus.io/v1
  • HUBOT_RADBUS_API_KEY - Set to the an API key that has been registered to your instance of Hubot. Go here for more information on how to request an API key.

Commands

hubot bus token {token} - Sets your application token (refresh token) so Hubot can call the RadBus API from the server-side on your behalf.
hubot bus me [route] - Returns your upcoming bus schedule (to work if its AM, to home if PM).  Optionally you can specify a route and it will only reply with departures from that route.
hubot bus {user} [route] - Same as 'bus me' but for a different Hubot user.
  • Before bus me will return anything useful, it needs to know your bus schedule. The easiest way to do that is to go build your personalized schedule using a RadBus app (for example: https://www.radbus.io).
  • Before Hubot will be allowed to make API calls on behalf of your user you need to aquire an application token (otherwise known as a 'refresh token') and register it with Hubot (see bus token command above). If you don't have a registered application token, Hubot will tell you what you need to do to get one.

Example Interactions

busrider> hubot bus me
hubot> Hey @busrider, give me a moment to look up those bus depatures...
       @busrider, here are your next bus times:
       7:23 AM (1 minuteundefined): 264-C @ I-35W and County Rd C Park & Ride
         http://goo.gl/WHgnd7
       7:39 AM (17 minutes): 264-C @ I-35W and County Rd C Park & Ride
         http://goo.gl/WbGdCc
       7:57 AM (35 minutes): 264-C @ I-35W and County Rd C Park & Ride

Resources

Current Tags

  • 0.2.6                                ...           latest (5 years ago)

2 Versions

  • 0.2.6                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |