{ "info": { "author": "Samir Omerovic", "author_email": "somerovi@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\nCosmicray-Rocketchat\n====================\n\n-----------------------------------------\nImplementation of Rocket.Chat restful api\n-----------------------------------------\n\n.. warning::\n\n Cosmicray-Rocketchat is under development\n\n\nInstall\n-------\n\n.. code::\n\n $ pip install cosmicray-rocketchat\n\n\nQuick start\n-----------\n\nCLI\n===\n\nCosmicray-Rocketchat ships with a simple commandline interface.\n\n.. code::\n\n $ rocketchat --help\n\n\nConfiguration: Credentials\n==========================\n\nCredentials are stored in a file called `~/.cosmicray/rocketchat/creds`. The following snippet of code creates it:\n\n.. code:: python\n\n >>> import rocketchat\n >>> rocketchat.create_creds_file('myusername', 'mypassword')\n\n\nConfiguration: Domain and other settings\n========================================\n\nThe following code will configure cosmicray-rocketchat client with the domain to use and save the configuration to file\n\n.. code:: python\n\n >>> import rocketchat\n >>> rocketchat.configure(domain='http://myrocketchatdomain.com')\n >>> rocketchat.store_config()\n\nWhen importing cosmicray-rocketchat, the config will be automatically loaded. If you need to disable ssl verification\n\n.. code:: python\n\n >>> rocketchat.configure(\n ... monkey_patch=True,\n ... verify=False)\n >>> rocketchat.store_config()\n\nThe `monkey_patch` flag disable SSL warnings.\n\nAlternatively, the above configurations can be changed using the cli:\n\n.. code::\n\n $ rocketchat configure password --username myusername\n Promp password:\n $ rocketchat configure domain \"http://myrocketchatdomain.com\" --no-verify\n\n\nConfiguration: Debugging\n========================\n\nIf there are any issues with making the requests, debugging can be enabled:\n\n.. code:: python\n\n >>> import rocketchat\n >>> rocketchat.configure(config={'debug': True})\n\nOr via command line:\n\n.. code::\n\n $ rocketchat configure domain --verbose\n\n\nAPI\n===\n\nCosmicray-Rocketchat defines endpoints from https://rocket.chat/docs/developer-guides/rest-api in `rocketchat.v1` module. For example, to get the server api version, you would make the following request:\n\n.. code:: python\n >>> import rocketchat\n >>> rocketchat.v1.info().get()\n\nThe preferred way to interact with the Rocket.Chat api is to use models defined in `rocketchat.models` module.\n\n.. code:: python\n\n >>> rocketchat.models.User.me\n \n >>> foo = rocketchat.models.User(username='foo').get()\n >>> foo.send('Hello foo')\n\n\nTo list public, groups, direct message rooms\n\n.. code:: python\n\n >>> rooms = rocketchat.models.Channel.channels\n >>> groups = rocketchat.models.Channel.groups\n >>> direct = rocketchat.models.Channel.direct\n\nFor convenience, one could access users and rooms via mappings:\n\n.. code:: python\n\n >>> users = rocketchat.users()\n >>> channels = rocketchat.channels()\n >>> groups = rocketchat.groups()\n >>> foo = users['foo']\n >>> foo.send('Hello Foo!')\n >>> messages = channels['mychannel'].messages.unread\n >>> channels['mychannel'].send('Hey!')\n\n\nTo list/send messages for a channel (direct, group, or public/private channel):\n\n.. code:: python\n\n >>> myroom = rocketchat.channels()['myroom']\n >>> print(myroom.messages.unread)\n >>> messages = myroom.messages.by_daterange('2018-01-01', '2018-01-02').count(100).get()\n >>> myroom.send('hello')\n\n\nTo update/delete messages:\n\n.. code:: python\n\n >>> message = myroom.messages.last[0]\n >>> message.msg = 'changed message'\n >>> message.update()\n >>> message.pin()\n >>> message.delete()\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cosmicray-rocketchat", "package_url": "https://pypi.org/project/cosmicray-rocketchat/", "platform": "", "project_url": "https://pypi.org/project/cosmicray-rocketchat/", "project_urls": null, "release_url": "https://pypi.org/project/cosmicray-rocketchat/0.0.3/", "requires_dist": [ "click (==6.7)", "cosmicray (>=0.0.9)", "six (==1.11.0)" ], "requires_python": "", "summary": "Rocket.Chat API Client", "version": "0.0.3" }, "last_serial": 3469473, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "b3ed8ebb835e54fd07d3a7b88e6936c5", "sha256": "ca96d1826bf82ae67cf5a18291986da497824e249e3d1c58a286465e50e27d61" }, "downloads": -1, "filename": "cosmicray_rocketchat-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b3ed8ebb835e54fd07d3a7b88e6936c5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14292, "upload_time": "2018-01-07T20:26:19", "url": "https://files.pythonhosted.org/packages/6e/6c/f731c3b89bfab69802f95359ac14aa93c4eb233e068377796e96b80f8b4c/cosmicray_rocketchat-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e88ccbbfd84f301c47e39f933392b40", "sha256": "b49af5c61105560150c0310b0dbb738dc5f49ce95b868e81b24d8fd6a9b11b67" }, "downloads": -1, "filename": "cosmicray-rocketchat-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7e88ccbbfd84f301c47e39f933392b40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12879, "upload_time": "2018-01-07T20:26:21", "url": "https://files.pythonhosted.org/packages/02/d6/29ec40b9bd366984529a0442da82fec3d1243d92cf9334ccf506fc58d2b6/cosmicray-rocketchat-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b3ed8ebb835e54fd07d3a7b88e6936c5", "sha256": "ca96d1826bf82ae67cf5a18291986da497824e249e3d1c58a286465e50e27d61" }, "downloads": -1, "filename": "cosmicray_rocketchat-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b3ed8ebb835e54fd07d3a7b88e6936c5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14292, "upload_time": "2018-01-07T20:26:19", "url": "https://files.pythonhosted.org/packages/6e/6c/f731c3b89bfab69802f95359ac14aa93c4eb233e068377796e96b80f8b4c/cosmicray_rocketchat-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e88ccbbfd84f301c47e39f933392b40", "sha256": "b49af5c61105560150c0310b0dbb738dc5f49ce95b868e81b24d8fd6a9b11b67" }, "downloads": -1, "filename": "cosmicray-rocketchat-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7e88ccbbfd84f301c47e39f933392b40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12879, "upload_time": "2018-01-07T20:26:21", "url": "https://files.pythonhosted.org/packages/02/d6/29ec40b9bd366984529a0442da82fec3d1243d92cf9334ccf506fc58d2b6/cosmicray-rocketchat-0.0.3.tar.gz" } ] }