get_rocket_channels_history: Retrieve a list of 'n" messages exchanged in public/open...

Description Usage Arguments Details Value Examples

View source: R/get_rocket_channels_history.R

Description

get_rocket_channels_history Gets a dataframe with the messages exchanged in a specific channel of a Rocket.chat server.

Usage

1
2
get_rocket_channels_history(url, user_id, auth_token, channel,
  n_messages = 0)

Arguments

url

The url of the rocket.chat server (has to be complete, with http or https).

user_id

The users ID retrieved from 'get_rocket_credentials'.

auth_token

The users authentication Token retrieved from 'get_rocket_credentials'.

channel

The name of the channel to get the history from

n_messages

The number of messages to be returned (default is 0, which brings the complete history)

Details

This function returns a dataframe containing 'n' messages exchanged in a public/open channel in a Rocket.chat server.

The return of this function contains the content of the message, who sent it (username and name), the ID of the sender, and a time stamp.

The function may be similar (some might say is equal) to 'get_rocket_groups_history', but Rocket.chat has a few differences in the API regarding public/open channels and private groups, this is the reason there are two functions.

Value

The return of this function is a dataframe.

Examples

1
2
3
4
5
6
7
8
## Not run: 
get_rocket_channels_history(url        = 'http://localhost:8000/',
                            user_id    = '<ROCKET_USER_ID>',
                            auth_token = '<ROCKET_USER_AUTH_TOKEN>',
                            channel = 'general',
                            n_messages = 0)

## End(Not run)

paeselhz/rocketeer documentation built on Nov. 11, 2019, 1:23 a.m.