Metadata-Version: 2.4
Name: rocketchat_API
Version: 3.1.0
Summary: Python API wrapper for Rocket.Chat
Author-email: "Jorge Alberto Díaz Orozco (Akiel)" <diazorozcoj@gmail.com>
Maintainer-email: "Jorge Alberto Díaz Orozco (Akiel)" <diazorozcoj@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/jadolg/rocketchat_API
Project-URL: Issues, https://github.com/jadolg/rocketchat_API/issues
Keywords: rocketchat,api,wrapper,rest
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests
Requires-Dist: packaging
Provides-Extra: test
Requires-Dist: black; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: requests; extra == "test"
Requires-Dist: semver; extra == "test"
Dynamic: license-file

## rocketchat_API

Python API wrapper for [Rocket.Chat](https://developer.rocket.chat/reference/api/rest-api/)

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fff725d9a0974c6597c2dd007daaa86e)](https://www.codacy.com/app/jadolg/rocketchat_API?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jadolg/rocketchat_API&amp;utm_campaign=Badge_Grade) [![Test](https://github.com/jadolg/rocketchat_API/actions/workflows/test.yml/badge.svg)](https://github.com/jadolg/rocketchat_API/actions/workflows/test.yml) [![Test against latest Rocket.Chat version](https://github.com/jadolg/rocketchat_API/actions/workflows/test_latest.yml/badge.svg)](https://github.com/jadolg/rocketchat_API/actions/workflows/test_latest.yml) [![codecov](https://codecov.io/gh/jadolg/rocketchat_API/branch/master/graph/badge.svg)](https://codecov.io/gh/jadolg/rocketchat_API) ![PyPI](https://img.shields.io/pypi/v/rocketchat_API.svg) ![](https://img.shields.io/pypi/dm/rocketchat-api.svg)

### Installation

- From pypi:
  `pip3 install rocketchat_API`
- From GitHub:
  Clone our repository and `pip install .` inside the cloned folder.

### Requirements

- [requests](https://github.com/kennethreitz/requests)

### Usage

```python
from rocketchat_API.rocketchat import RocketChat

rocket = RocketChat('user', 'pass', server_url='https://demo.rocket.chat')
rocket.me()
for channel in rocket.channels_list():
    print(channel.get("name"))
rocket.chat_post_message('good news everyone!', channel='GENERAL', alias='Farnsworth')
rocket.channels_history('GENERAL', count=5)
```

#### Using a token for authentication instead of user and password

```python
from rocketchat_API.rocketchat import RocketChat

rocket = RocketChat(user_id='WPXGmQ64S3BXdCRb6', auth_token='jvNyOYw2f0YKwtiFS06Fk21HBRBBuV7zI43HmkNzI_s',
                    server_url='https://demo.rocket.chat')
rocket.me()
```

### 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](https://developer.rocket.chat/reference/api/rest-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.

### Tests

We are actively testing :)

Tests run on a Rocket.Chat Docker container so install Docker and docker-compose.

1. To start test server do `docker-compose up` and to take test server down `docker-compose down`
2. To run the tests run `pytest`

### 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).
Please, try to implement tests for all your code and use a PEP8 compliant code style.

Reporting bugs and asking for features is also contributing ;) Feel free to help us grow by registering issues.

We hang out [here](https://open.rocket.chat/channel/python_rocketchat_api) if you want to talk.

### Supporters

[![JetBrains logo.](https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg)](https://jb.gg/OpenSourceSupport)

[JetBrains](https://www.jetbrains.com/) supports this project by providing us with licenses for their fantastic
products.
