![]() ![]() JetBrains supports this project by providing us with licenses for their fantastic products. Reporting bugs and asking for features is also contributing ) Feel free to help us grow by registering issues. Please, try to implement tests for all your code and use a PEP8 compliant code style. (It may take a while to merge your code but if it's good it will be merged). You can contribute by doing Pull Requests. To start test server do docker-compose up and to take test server down docker-compose down.Tests run on a Rocket.Chat Docker container so install Docker and docker-compose. If you are interested in a specific call just open an issue or open a pull request. You can do that doing a POST to the following end point youdomain/api/v1/login and providing the fields username and password on the body. Most of the API methods are already implemented. For a detailed parameters list check the Rocket chat API API coverage ![]() Only required parameters are explicit on the RocketChat class but you can still use all other parameters. json ()) Using a token for authentication instead of user and password from pprint import pprint from rocketchat_API.rocketchat import RocketChat rocket = RocketChat ( user_id = 'WPXGmQ64S3BXdCRb6', auth_token = 'jvNyOYw2f0YKwtiFS06Fk21HBRBBuV7zI43HmkNzI_s', server_url = '' ) pprint ( rocket. channels_history ( 'GENERAL', count = 5 ). chat_post_message ( 'good news everyone!', channel = 'GENERAL', alias = 'Farnsworth' ). const auth realTimeApi.login(USERNAME, PASSWORD). Session () as session : rocket = RocketChat ( 'user', 'pass', server_url = '', session = session ) pprint ( rocket. subscribe() // Responds pong to the ping message sent by the Realtime API. from requests import sessions from pprint import pprint from rocketchat_API.rocketchat import RocketChat with sessions. In the rocketchatAPI in the constructor of the RocketChat, the login method fails with http 401. This will save significant time by avoiding re-negotiation of TLS (SSL) with the chat server on each call. python api wrapper for rocket.chat from githubhelp. You have two choices imho: set login fallback to true (see also API login doesnt work with an LDAP user when 'Login Fallback' parameter is False 7642) register and use an additional local Rocket. You can‘t use any LDAP based user when using the API. If you are going to make a couple of request, you can user connection pooling provided by requests. Had the same problems a couple of days ago. Note: every method returns a requests Response object. Usage from pprint import pprint from rocketchat_API.rocketchat import RocketChat proxy_dict = rocket = RocketChat ( 'user', 'pass', server_url = '', proxies = proxy_dict ) pprint ( rocket. Clone our repository and python3 setup.py install ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |