Documentation ¶
Overview ¶
Package hipchat is used for implementing a StatusService in BusyBee.
It is not recommended to use this package outside of BusyBee. To use with BusyBee make sure to import this package. You can do so by adding the following:
import _ "github.com/dixonwille/busybee/hipchat"
But since you will need the Configuration Struct it may just be easier to use it like normal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶ added in v0.1.2
type Conf struct { Host string `quest:"What is the hipchat host?"` Token string `quest:"What is your hipchat token?,encrypt"` }
Conf holds all the needed information to create a new hipchat service.
type Error ¶
type Error struct {
Error *ErrorBody `json:"error"`
}
Error is a response from hipchat that returns an error.
type ErrorBody ¶
type ErrorBody struct { Code int `json:"code"` Message string `json:"message"` Type string `json:"type"` }
ErrorBody is the main body of the error response.
type Hipchat ¶
type Hipchat struct {
// contains filtered or unexported fields
}
Hipchat is of type StatusService that can be used to get and update the status of a user.
func (*Hipchat) UpdateStatus ¶
UpdateStatus will update the status of the user to the status specified. Will not update if the user is already on specified status. Updates the show if in meeting to DnD always. Updates the show if DnD to Available but never Away to Available. Updates the Status message to "In a meeting (BusyBee)" if changing to DnD. Updates the Status message to "I'm free (BusyBee)" if changing to Available.
type User ¶
type User struct { ID int `json:"id,omitempty"` Name string `json:"name"` MentionName string `json:"mention_name"` Presence *UserPresence `json:"presence"` Email string `json:"email"` Roles []string `json:"roles"` Title string `json:"title"` GroupAdmin bool `json:"is_group_admin"` TimeZone string `json:"timezone"` }
User is a user in hipchat.
type UserPresence ¶
UserPresence is part of the body in a hipchat user. This states whether the user is busy or not "show" and a reason "status".