Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andybons/hipchat
This project implements a Go client library for the Hipchat API.
https://github.com/andybons/hipchat
Last synced: 12 days ago
JSON representation
This project implements a Go client library for the Hipchat API.
- Host: GitHub
- URL: https://github.com/andybons/hipchat
- Owner: andybons
- License: mit
- Created: 2012-10-20T18:34:06.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-03-24T19:12:10.000Z (over 8 years ago)
- Last Synced: 2024-10-20T19:39:43.822Z (19 days ago)
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 104
- Watchers: 7
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-go - hipchat - This project implements a golang client library for the Hipchat API. (Third-party APIs / Utility/Miscellaneous)
- awesome-cobol - hipchat - This project implements a cobollang client library for the Hipchat API. (Third-party APIs / Middlewares)
- awesome-go - hipchat - This project implements a Go client library for the Hipchat API. - ★ 108 (Third-party APIs)
- awesome-go-extra - hipchat - 10-20T18:34:06Z|2016-03-24T19:12:10Z| (Third-party APIs / Fail injection)
README
Hipchat
=====
This project implements a [Go](http://golang.org) client library for the [Hipchat API](https://www.hipchat.com/docs/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](http://godoc.org/github.com/andybons/hipchat).
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](https://www.twitter.com/andybons)
Installing
----------
Run
```bash
go get github.com/andybons/hipchat
```Example usage:
```go
package mainimport (
"github.com/andybons/hipchat"
"log"
)func main() {
c := hipchat.NewClient("")
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:
```go
c := hipchat.NewClient("")
c.BaseURL = "https://your.host.name/v1"
...
```Use customized proxy settings In case you need to use transport other than `http.DefaultTransport`:
```go
c := hipchat.NewClient("")proxyURL, err := url.Parse("")
if err != nil {
log.Fatalf("Expected no error, but got %q", err)
}
c.Transport = &http.Transport{Proxy: http.ProxyURL(proxyURL)}
```Contributors
------------
+ Akshay Shah ([@akshayjshah](https://github.com/akshayjshah))
+ Michael Biven ([@michaelbiven](https://github.com/michaelbiven))
+ Tarrant Rollins ([@tarrant](https://github.com/tarrant))
+ Edward Muller ([@freeformz](https://github.com/freeformz))
+ Matt Blair ([@mblair](https://github.com/mblair))
+ Gordon Goetz ([@gtosh4](https://github.com/gtosh4))
+ Paras Patel ([@patelparas](https://github.com/PatelParas))