Skip to main content

Python API wrapper for Rocket.Chat

Project description

rocketchat_API

Python API wrapper for Rocket.Chat

Codacy Badge Build Status

Installation

  • From pypi: pip3 install rocketchat_API
  • From GitHub: Clone our repository and python3 setup.py install

Requirements

Usage

from pprint import pprint
from rocketchat_API.rocketchat import RocketChat

proxyDict = {
              "http"  : "http://127.0.0.1:3128",
              "https" : "https://127.0.0.1:3128",
            }

rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat', proxies=proxyDict)
pprint(rocket.me().json())
pprint(rocket.channels_list().json())
pprint(rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth').json())
pprint(rocket.channels_history('GENERAL', count=5).json())

note: every method returns a requests Response object.

Method parameters

Only required parameters are explicit on the RocketChat class but you can still use all other parameters. For a detailed parameters list check the Rocket chat API

API coverage

Most of the API methods are already implemented. If you are interested in a specific call just open an issue or open a pull request.

note: Library updated to work with Rocket.Chat >= 0.58.0

Tests

We started writing tests :D

Tests run on a Rocket.Chat Docker container so install Docker and docker-compose. To start test server do docker-compose up on tests/testserver and to take test server down docker-compose down

Contributing

You can contribute by doing Pull Requests. (It may take a while to merge your code but if it's good it will be merged). We hang out here if you want to talk.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rocketchat_API-0.6.14-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

rocketchat_API-0.6.14-py2-none-any.whl (6.6 kB view details)

Uploaded Python 2

File details

Details for the file rocketchat_API-0.6.14-py3-none-any.whl.

File metadata

File hashes

Hashes for rocketchat_API-0.6.14-py3-none-any.whl
Algorithm Hash digest
SHA256 86ac834ec3090e2e9dd94e6333b86d8cdef7ceff22d544ef9d267aaae1deeb09
MD5 d9bc50d326bd0256f1090da4522b1493
BLAKE2b-256 8dfc03e8d52decdb73fc5c5fac4a557ab573f9ef508ebbd2e7b27ffe5b0771d2

See more details on using hashes here.

File details

Details for the file rocketchat_API-0.6.14-py2-none-any.whl.

File metadata

File hashes

Hashes for rocketchat_API-0.6.14-py2-none-any.whl
Algorithm Hash digest
SHA256 cef7ce21bf0c572992fbf829c6db4f5fdbcc73d91a8f6dbeaa017e3244a75c7d
MD5 e68b8f0cddfe7581e5c8762465f5f413
BLAKE2b-256 52d582897a9365ddd1f2cc404690827bd2cfcf97e83b2eefba8c795a2ea34896

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page