#### RocketChat API
Python API wrapper for the [Rocket chat API](https://rocket.chat/docs/developer-guides/rest-api)
[Documentation](http://docs.rocket-python.com)
![Travis (.org)](https://img.shields.io/travis/Pipoline/rocket-python)
![PyPI - Downloads](https://img.shields.io/pypi/dm/rocket-python)
![PyPI](https://img.shields.io/pypi/v/rocket-python)
![Codecov](https://img.shields.io/codecov/c/github/Pipoline/rocket-python)
#### Install
pip install rocket-python
#### Usage
Initialize the client with a username and password or token and user_id.
This user *must* have Admin privs:
from rocketchat.api import RocketChatAPI
api = RocketChatAPI(settings={'username': 'someuser', 'password': 'somepassword',
'domain': 'https://myrockethchatdomain.com'})
# or
api = RocketChatAPI(settings={'token': 'sometoken', 'user_id': 'someuserid',
'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.create_public_room('room_name',
members=[],
read_only=False)
api.delete_public_room('room_id')
api.get_my_info()
api.get_users()
api.get_user_info('user_id')
api.create_user('email',
'name',
'password',
'username',
active=True,
roles=['user'],
join_default_channels=True,
require_password_change=False,
send_welcome_email=False,
verified=False,
customFields=None)
api.delete_user('user_id')
api.upload_file(room_id='room_id',
file='file',
description='File description',
message='Example message')
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)
Raw data
{
"_id": null,
"home_page": "https://github.com/Pipoline/rocket-python",
"name": "rocket-python",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "rocketchat",
"author": "Derek Stegelman, Peter Gonda",
"author_email": "",
"download_url": "",
"platform": null,
"description": "#### RocketChat API\n\nPython API wrapper for the [Rocket chat API](https://rocket.chat/docs/developer-guides/rest-api)\n\n[Documentation](http://docs.rocket-python.com)\n\n![Travis (.org)](https://img.shields.io/travis/Pipoline/rocket-python)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/rocket-python)\n![PyPI](https://img.shields.io/pypi/v/rocket-python)\n![Codecov](https://img.shields.io/codecov/c/github/Pipoline/rocket-python)\n\n#### Install\n\n pip install rocket-python\n\n#### Usage\n\nInitialize the client with a username and password or token and user_id.\nThis user *must* have Admin privs:\n\n from rocketchat.api import RocketChatAPI\n\n api = RocketChatAPI(settings={'username': 'someuser', 'password': 'somepassword',\n 'domain': 'https://myrockethchatdomain.com'})\n # or\n api = RocketChatAPI(settings={'token': 'sometoken', 'user_id': 'someuserid',\n 'domain': 'https://myrockethchatdomain.com'})\n\n##### Available Calls\n api.send_message('message', 'room_id')\n \n api.get_private_rooms()\n \n api.get_private_room_history('room_id', oldest=date)\n \n api.get_public_rooms()\n \n api.get_room_info('room_id')\n \n api.get_private_room_info('room_id')\n \n api.get_room_history('room_id')\n \n api.create_public_room('room_name', \n members=[], \n read_only=False)\n \n api.delete_public_room('room_id')\n \n api.get_my_info()\n \n api.get_users()\n \n api.get_user_info('user_id')\n \n api.create_user('email', \n 'name', \n 'password', \n 'username', \n active=True, \n roles=['user'], \n join_default_channels=True, \n require_password_change=False, \n send_welcome_email=False, \n verified=False, \n customFields=None)\n \n api.delete_user('user_id')\n \n api.upload_file(room_id='room_id',\n file='file',\n description='File description',\n message='Example message')\n\ncheck /rocketchat/calls/api.py for more.\n\n#### Running Tests\n\n py.test tests rocketchat\n\n##### Sending a message\n\nYou'll first need to get the _id of the room you want to send a message to. Currently, Rocket\ncan only send messages to *public* rooms.\n\n api.send_message('Your message', room_id)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "RocketChat API with Python",
"version": "1.3.4",
"project_urls": {
"Homepage": "https://github.com/Pipoline/rocket-python"
},
"split_keywords": [
"rocketchat"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f1a8da6412023ab9ef761f5a6100708746890e9312e89ac6f511c581ad359420",
"md5": "142ddaa64a683c5132543f6b6d1abea2",
"sha256": "5400372dcc02fc6d1090f1408f08384aedfeaa7c4b6f07a51fbbdb63ab448e4e"
},
"downloads": -1,
"filename": "rocket_python-1.3.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "142ddaa64a683c5132543f6b6d1abea2",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 22253,
"upload_time": "2023-07-07T12:18:17",
"upload_time_iso_8601": "2023-07-07T12:18:17.901188Z",
"url": "https://files.pythonhosted.org/packages/f1/a8/da6412023ab9ef761f5a6100708746890e9312e89ac6f511c581ad359420/rocket_python-1.3.4-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-07 12:18:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Pipoline",
"github_project": "rocket-python",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "rocket-python"
}