skip to navigation
skip to content

rocket-python 1.2.4

RocketChat API with Python

#### 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)
 
File Type Py Version Uploaded on Size
rocket-python-1.2.4.tar.gz (md5) Source 2017-07-24 5KB
rocket_python-1.2.4-py2.py3-none-any.whl (md5) Python Wheel 2.7 2017-07-24 12KB