{ "info": { "author": "Evan Pratten", "author_email": "ewpratten@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# drbot\nA Python3 library for easily building devRant bots\n\n## Using\nTo make a bot, all you need to do is extend the `BotBuilder` class and define an `onNotif()` method\n\n```python\nfrom drbot.botbuilder import BotBuilder, NotifType\n\n# Testing setup\nclass MyBot(BotBuilder):\n \n onNotif(self, type, content):\n # Handle notifs here\n pass\n\n# Create a bot\nmy_bot = MyBot(\"username\", \"password\")\n\n# Set how long the bot should wait between notif queries (in seconds)\ninterval = 10\n\n# Start the bot\nmy_bot.start(interval)\n```\n\nThat's it!\n\n## Using the API\nEvery `BotBuilder` class has a built in API wrapper. This can be accessed through `self.api`, and contains the following methods:\n```python\ngetUserInfo(username: str) -> dict\n\ngetUsername(user_id: int) -> str\n\npostRant(body: str, tags: str) -> None\n\npostComment(rant_id: int, content: str) -> None\n\ngetComment(comment_id: int) -> dict\n```\n\nThe `BotBuilder` automatically handles login, sessions, notif management, and some data parsing. If you are looking to override these, you may be interested in the following API methods:\n```python\nlogin(username: str, password: str) -> None\n\nhasAuthExpired() -> bool\n\ngetNotifs() -> list\n\nclearNotifs() -> None\n\ngetUserId(username: str) -> int\n```\n\n## Installing\nThis library is avalible on PYPI. \n\nWith `python3.7` and `python3-pip` installed, run:\n```\npip3 install drbot\n```\n\nto install `drbot`", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Ewpratten/drbot", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "drbot", "package_url": "https://pypi.org/project/drbot/", "platform": "", "project_url": "https://pypi.org/project/drbot/", "project_urls": { "Homepage": "https://github.com/Ewpratten/drbot" }, "release_url": "https://pypi.org/project/drbot/1.0/", "requires_dist": null, "requires_python": "", "summary": "A Python3 library for easily building devRant bots", "version": "1.0" }, "last_serial": 5527489, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "00e98f33fb666b218c49776d5f338727", "sha256": "922da96406d94fcedd55d93c7478a0b5d7f50289b78b46ce6e9592206f49d830" }, "downloads": -1, "filename": "drbot-1.0.tar.gz", "has_sig": false, "md5_digest": "00e98f33fb666b218c49776d5f338727", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3149, "upload_time": "2019-07-13T17:57:18", "url": "https://files.pythonhosted.org/packages/e2/b1/fe16c34980a833ae8aadda7e1472778d7e74c14b6516a440421015d7cdae/drbot-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "00e98f33fb666b218c49776d5f338727", "sha256": "922da96406d94fcedd55d93c7478a0b5d7f50289b78b46ce6e9592206f49d830" }, "downloads": -1, "filename": "drbot-1.0.tar.gz", "has_sig": false, "md5_digest": "00e98f33fb666b218c49776d5f338727", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3149, "upload_time": "2019-07-13T17:57:18", "url": "https://files.pythonhosted.org/packages/e2/b1/fe16c34980a833ae8aadda7e1472778d7e74c14b6516a440421015d7cdae/drbot-1.0.tar.gz" } ] }