Documentation ¶
Overview ¶
Package hipchat provides programtic interaction with HipChat's API
Index ¶
- Variables
- type Client
- func (c *Client) GetRoom(name_or_id string) (*Room, error)
- func (c *Client) GetUser(id_or_email string) (*User, error)
- func (c *Client) Rooms() ([]Room, error)
- func (c *Client) SendNotification(room string, message string, color Color) error
- func (c *Client) TraceOff()
- func (c *Client) TraceOn(logger *log.Logger)
- func (c *Client) Users() ([]User, error)
- type Color
- type Error
- type Room
- type User
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseURL = "https://api.hipchat.com/v2/"
View Source
var ErrUnknown = errors.New("An unknown error occurred.")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the primary struct that this package provides. It represents the connection to the HipChat API
func NewClient ¶
Example ¶
authToken := "le api token here" client, err := hipchat.NewClient(authToken) _ = client fmt.Println(err)
Output: <nil>
func (*Client) SendNotification ¶
SendNotification sends a notification the the room
type Error ¶
type Room ¶
type Room struct { ID int `json:"id"` Name string `json:"name"` Created string `json:"created"` Topic string `json:"topic"` GuestAccessURL interface{} `json:"guest_access_url"` IsArchived bool `json:"is_archived"` IsGuestAccessible bool `json:"is_guest_accessible"` LastActive string `json:"last_active"` Links struct { Self string `json:"self"` Webhooks string `json:"webhooks"` } `json:"links"` Owner struct { ID int `json:"id"` Links struct { Self string `json:"self"` } `json:"links"` MentionName string `json:"mention_name"` Name string `json:"name"` } `json:"owner"` Participants []struct { ID int `json:"id"` Links struct { Self string `json:"self"` } `json:"links"` MentionName string `json:"mention_name"` Name string `json:"name"` } `json:"participants"` Privacy string `json:"privacy"` Statistics struct { Links struct { Self string `json:"self"` } `json:"links"` } `json:"statistics"` XmppJid string `json:"xmpp_jid"` // contains filtered or unexported fields }
func (*Room) SendNotification ¶
SendNotification sends a notification the the room
type User ¶
type User struct { ID int `json:"id"` Name string `json:"name"` MentionName string `json:"mention_name"` Created string `json:"created"` AtlassianID interface{} `json:"atlassian_id"` Email string `json:"email"` Group struct { ID int `json:"id"` Links struct { Self string `json:"self"` } `json:"links"` Name string `json:"name"` } `json:"group"` IsDeleted bool `json:"is_deleted"` IsGroupAdmin bool `json:"is_group_admin"` IsGuest bool `json:"is_guest"` LastActive string `json:"last_active"` Links struct { Self string `json:"self"` } `json:"links"` PhotoURL string `json:"photo_url"` Presence struct { Client struct { Type string `json:"type"` Version string `json:"version"` } `json:"client"` IsOnline bool `json:"is_online"` } `json:"presence"` Timezone string `json:"timezone"` Title string `json:"title"` XmppJid string `json:"xmpp_jid"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
hipchat
NAME hipchat − a cli for hipchat SYNOPSIS hipchat [OPTIONS] DESCRIPTION OPTIONS ‐v, ‐‐verbose Be verbose ‐a, ‐‐authToken Hipchat auth token ‐h, ‐‐help Show this help message COMMANDS send room notification Usage: hipchat [OPTIONS] notify [notify‐OPTIONS] ‐r, ‐‐room Room name or ID ‐m, ‐‐message Message to send ‐c, ‐‐color Color of message (yellow, green, red, purple, gray, ran‐ dom) ‐h, ‐‐help Show this help message
|
NAME hipchat − a cli for hipchat SYNOPSIS hipchat [OPTIONS] DESCRIPTION OPTIONS ‐v, ‐‐verbose Be verbose ‐a, ‐‐authToken Hipchat auth token ‐h, ‐‐help Show this help message COMMANDS send room notification Usage: hipchat [OPTIONS] notify [notify‐OPTIONS] ‐r, ‐‐room Room name or ID ‐m, ‐‐message Message to send ‐c, ‐‐color Color of message (yellow, green, red, purple, gray, ran‐ dom) ‐h, ‐‐help Show this help message |
Click to show internal directories.
Click to hide internal directories.