Description Usage Arguments Value Examples
If there is a @
character, we assume it is a user. Otherwise,
we assume it is a room. If it consists of all numbers, we assume it is
an ID. If it exists in the list of room IDs accessible to this user,
(see hipchat_rooms
) it is assumed to be a room ID. Otherwise,
it is assumed to be a user ID.
1 | determine_target(room_or_user, api_token = hipchat_api_token())
|
room_or_user |
character or integer |
api_token |
character. Optional API token. The default is
|
a list with two keys, target
and type
.
The former will be an attempt to coerce the value to an ID (so that
room IDs are preferred to room names). The type
key will
contain one of c("room", "user")
according as room_or_user
is determined to be a room or user.
1 2 3 4 5 6 7 | stopifnot(hipchat:::determine_target('some@guy.com')$type == 'user')
## Not run:
stopifnot(is.numeric(hipchat:::determine_target('Some room')$target))
# Will be a room ID, assuming "Some room" exists.
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.