This is a really simple module offering a thin wrapper around the Rocket.Chat REST API. It only provides a simple means to deal with authentication and does not provide any functions for the REST endpoints.
# Clone & Create Virtual environment $ git clone https://gist.github.com/exhuma/0c28a4e41c476e122909a3521ae96d1a rchat-client $ cd rchat-client $ python -m venv env # Install the requirements into the new environment $ ./env/bin/pip install -r requirements.txt
After running the above steps the Python interpreter in env/bin/python
will
be able to run the main script.
See the function main
in main.py
.
API calls are rooted at /api/v1
.
For API documentation see https://rocket.chat/docs/developer-guides/rest-api/
Place a file called app.py
into ~/.config/ept/rchat
with the following
contents (using your own values of course):
[server] url=https://url.to.your.rocket.chat [auth] login=your-username password=your-password
Given that the file contains sensitive information, it will only be loaded if
it has 600
permissions!