RocketChat API with Python
Project description
#### RocketChat API
Python API wrapper for the [Rocket chat API](https://rocket.chat/docs/developer-guides/rest-api)
[Documentation](http://rocket-python.readthedocs.io/en/latest/)
#### Install
pip install rocket-python
#### Usage
Initialize the client with a username and password. This user must have Admin privs:
from rocketchat.api import RocketChatAPI api = RocketChatAPI(settings={'username': 'someuser', 'password': 'somepassword', 'domain': 'https://myrockethchatdomain.com'})
- ##### Available Calls
api.send_message(‘message’, ‘room_id’) api.get_private_rooms() api.get_private_room_history(‘room_id’, oldest=date) api.get_public_rooms() api.get_room_info(‘room_id’) api.get_private_room_info(‘room_id’) api.get_room_history(‘room_id’) api.get_my_info()
check /rocketchat/calls/api.py for more.
#### Running Tests
py.test tests rocketchat
##### Sending a message
You’ll first need to get the _id of the room you want to send a message to. Currently, Rocket can only send messages to public rooms.
api.send_message(‘Your message’, room_id)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rocket_python-1.2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ef53f5476ca0e415a1605e69f5c093d0c4108381517526a47e9842acccf6a6 |
|
MD5 | f0a6b9ae2105e6599112e0bebd2bb70d |
|
BLAKE2b-256 | 806907b2fefe43e6ce369750a57f0c5f5c27a722be9d5ec33c233f63be8e2447 |