get_rocket_credentials: Get Rocket.chat user credentials

Description Usage Arguments Details Value Examples

View source: R/get_rocket_credentials.R

Description

get_rocket_credentials Connects with the Rocket.chat REST API and returns the user ID and token.

Usage

1
2
get_rocket_credentials(url, user,
  password = rstudioapi::askForPassword())

Arguments

url

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

user

The username of login which will be used to extract ID and Token

password

This argument can be set manually, but as default it opens a popup in RStudio for the user to type the password.

Details

This function connects with the Rocket.chat REST API to gather the users ID and token. This sort of information will be needed to any function, since the "contract" between R and the API of rocket depends on Token Authentication

Value

Given a valid url, user and password, this function returns a named list containing the user_id argument and the auth_token argument.

Examples

1
2
3
4
## Not run: 
get_rocket_credentials('http://localhost:8000/', user = 'me')

## End(Not run)

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