hipchat-go

module
v0.0.0-...-bd47a18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2015 License: Apache-2.0

README

hipchat-go

Go client library for the HipChat API v2.

GoDoc Build Status

Currently only a small part of the API is implemented, so pull requests are welcome.

Usage
import "github.com/tbruyelle/hipchat-go/hipchat"

Build a new client, then use the client.Room service to spam all the rooms you have access to (not recommanded):

c := hipchat.NewClient("<your AuthToken here>")

rooms, _, err := c.Room.List()
if err != nil {
	panic(err)
}

notifRq := &hipchat.NotificationRequest{Message: "Hey there!"}

for _, room := range rooms.Items {
	_, err := c.Room.Notification(room.Name, notifRq)
	if err != nil {
		panic(err)
	}
}

The code architecture is hugely inspired by google/go-github.

Directories

Path Synopsis
examples
Package hipchat provides a client for using the HipChat API v2.
Package hipchat provides a client for using the HipChat API v2.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL