hipchat
This project implements a golang client library for the Hipchat API
About hipchat
Hipchat
This project implements a Go client library for the Hipchat API (API version 2 is not supported).
Pull requests are welcome as the API is limited to only a few calls right now.
API documentation can be found on godoc.org.
Star this or get at me on the Twitters if you end up using this since this is pretty early stage and I may make breaking changes to the API. – @andybons
Installing
Run
go get github.com/andybons/hipchat
Example usage:
package main
import (
"github.com/andybons/hipchat"
"log"
)
func main() {
c := hipchat.NewClient("<PUT YOUR AUTH TOKEN HERE>")
req := hipchat.MessageRequest{
RoomId: "Rat Man's Den",
From: "GLaDOS",
Message: "Bad news: Combustible lemons failed.",
Color: hipchat.ColorPurple,
MessageFormat: hipchat.FormatText,
Notify: true,
}
if err := c.PostMessage(req); err != nil {
log.Printf("Expected no error, but got %q", err)
}
}
Setting a custom HipChat Server:
c := hipchat.NewClient("<AUTH TOKEN>")
c.BaseURL = "https://your.host.name/v1"
...
Use customized proxy settings In case you need to use transport other than http.DefaultTransport:
c := hipchat.NewClient("<AUTH TOKEN>")
proxyURL, err := url.Parse("<PROXY_URL:PROXY_PORT>")
if err != nil {
log.Fatalf("Expected no error, but got %q", err)
}
c.Transport = &http.Transport{Proxy: http.ProxyURL(proxyURL)}
Contributors
- Akshay Shah (@akshayjshah)
- Michael Biven (@michaelbiven)
- Tarrant Rollins (@tarrant)
- Edward Muller (@freeformz)
- Matt Blair (@mblair)
- Gordon Goetz (@gtosh4)
- Paras Patel (@patelparas)
Frequently Asked Questions
What is hipchat?
hipchat is a Third-party APIs library for the Go programming language. This project implements a golang client library for the Hipchat API
How do I install hipchat?
Install hipchat with the Go module system using `go get andybons/hipchat`. Check the repository for the current installation instructions.
What category does hipchat belong to?
hipchat is listed under Third-party APIs, specifically Third-party APIs.