Hipbot-go is a Hipchat bot written in Go. This was my first Go project.
Hipbot-go is a neat little bot with some awesome functionality. He sits comfortably in your Hipchat room waiting for a command. You can ask Hipbot-go to search for nearby restaurants, find an image given a tag, get the latest New York Times articles from a section, report the weather forecast. These are just examples (see below for full command list).
- @hipbot nearby sushi
- Google Places search for "sushi" near your specified lat & lng
- @hipbot nytimes technology
- Search recent New York Times articles in the "technology" section
- @hipbot image me sunset
- Search Flickr for a photo of a "sunset"
- @hipbot weather me tomorrow
- Get tomorrow's weather
- @hipbot trivia me today
- Get trivia factoids for today's date (interesting or historical events)
- @hipbot trivia me 123
- Get trivia on a number "123" (math facts)
- @hipbot wolfram me periodic table of elements
- Get computational information from Wolfram Alpha on the "periodic table of elements"
- @hipbot gopkg math
- Get the synopsis and path for the Go[lang] package "math"
- @hipbot company logo
- Get the logo of your company (url specified by you - see configuration section of the wiki)
- @hipbot thesaurus me challenge
- Get synonyms for the word "challenge"
- @hipbot search me HMAC
- Search the web for information on "HMAC" (uses duckduckgo.com for search engine)
- @hipbot goodnight
- Tell Hipbot-go goodnight! He will respond with a nice farewell
- @hipbot foobar baz
- Say anything else, and hipbot will respond with "Hello, FirstName LastName"
- Clone the Hipbot-go repo
git clone [email protected]:adams-sarah/hipgo.git
- Deploy your Hipbot-go app to a server (Heroku is an easy one). You'll need to use a custom buildpack on Heroku:
heroku create -b https://github.com/kr/heroku-buildpack-go.git
. - Set the necessary environment variables for your Hipbot-go app - list is below.
- If there's any functionality you don't want to use, be sure to comment it out in
speak.go
. - Run hipbot on a worker instance. On Heroku, configuring this is a matter of setting your free Dyno to 'worker' and not 'web'. You can do this at https://dashboard.heroku.com/apps/YOUR-APP-NAME/resources
- Flickr (
image me
):FLICKR_API_KEY
- New York Times (
nytimes me
):NYTIMES_API_KEY
- Google (
nearby
):GOOGLE_API_KEY
- BigHugeLabs (
thesaurus me
):BIG_HUGE_LABS_API_KEY
- Forecast.io (
weather me
):FORECAST_IO_API_KEY
- Wolfram Alpha (
wolfram me
):WOLFRAM_API_ID
BOT_FULLNAME
BOT_MENTIONNAME
BOT_PASSWORD
BOT_USERNAME
ROOM_API_TOKEN
ROOM_ID
ROOM_JID
LAT_LNG_PAIR
(ie. "28.776266,-100.397550")COMPANY_LOGO_URL