Description Usage Arguments Value See Also Examples
Description: Communication with the hipchat API, including sending messages to rooms, creating and destroying rooms, changing the topic, and manipulating and messaging users.
Send a message to a Hipchat room or user.
1 2 | hipchat(room_or_user, message, notify = TRUE, color = "yellow",
message_format = "text", api_token = hipchat_api_token())
|
room_or_user |
character or integer. The room(s) and/or user(s) to send a
message to. Room and/or user IDs will also work, but you will first
have to obtain the correct ID, so it is easier to user the former.
Rooms can be specified by full name (e.g., If IDs are provided, they will be checked against the list of available room IDs. If the ID is present, a room ID will be assumed; otherwise, a user ID will be assumed. |
message |
character. The message(s) to send. If a message is over 10,000 characters, it will be split up into multiple messages, as the Hipchat API only allows up to 10,000 characters per message. |
notify |
logical. Whether or not to notify the target recipient.
The default is |
color |
character. Available options are: yellow, red, green, purple, gray, or random. Defaults to yellow. If this is a message sent to a user, this option will be ignored. |
message_format |
character. Available options are: text or html. The default is text. |
api_token |
character. Optional API token. The default is
|
TRUE
if the message was successfull, or an error otherwise.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
hipchat('Some room', 'Hey guys!')
hipchat('some@user.org', "Hey buddy how's it going?")
hipchat('Some room', 'Server is down!', color = 'red')
hipchat('Some room', 'Look at this picture: <img src="https://www.google.com/images/srpr/logo11w.png">', message_format = 'html')
# A more comprehensive example
hipchat(c("This room", 'and.this@user.org'), "Really important stuff", notify = TRUE,
color = 'red', message_format = 'text', api_token = 'my_api_token')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.