{ "info": { "author": "Geraldo Castro", "author_email": "victormatheuscastro@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "\n# RestSMSGateway :love_letter:\n\n >Unofficial Library\n\nREST SMS Gateway allows to change your phone into a powerful SMS Gateway which you can control from a computer.\n\n\n\n## Getting Started\n\n\n\n> Note: The computer (that will run the script) and your phone have to be connected on the same network. **Android only!**\n\n First of all, you have to install [Rest SMS Gateway](http://bit.ly/RestSMSGateway) on your Android phone.\n\nOpen the app and press the `start` button. You'll need the IP address shown in there (e.g, `http://172.16.19.77:8080`).\n\n\n\n### Installing\n\n\n\nEasy-peasy! You only need to run one command\n\n```\npip install rest-sms-gateway\n```\n\n\n\n## Running the tests\n>Note: My mistake!\n\nWe don't have test yet.\n\n\n\n## Examples\nImport and configure the client:\n```python\n>>> from rest_sms_gateway import SMSGatewayClient \n>>> client = SMSGatewayClient('http://172.16.19.77:8080')\n```\n\nNow, you can do what you want (or almost)!\n\nLet's list all conversations available in the mobile phone:\n```python\n>>> client.get_thread() \n\n#OUTPUT\n# {'threads': [{'timestamps': {'update': '1544785173349'}, '_id': '95'},\n# {'timestamps': {'update': '1544751618760'}, '_id': '94'},\n# {'timestamps': {'update': '1544751384521'}, '_id': '93'},\n# {'timestamps': {'update': '1544115829308'}, '_id': '92'},\n# {'timestamps': {'update': '1543572583029'}, '_id': '91'},\n# {'timestamps': {'update': '1543275852269'}, '_id': '90'},\n# {'timestamps': {'update': '1544204987635'}, '_id': '89'},\n# {'timestamps': {'update': '1541087704128'}, '_id': '88'},\n# {'timestamps': {'update': '1540053558537'}, '_id': '87'},\n# {'timestamps': {'update': '1539808989397'}, '_id': '86'}],\n# 'size': 10,\n# 'limit': '10',\n# 'offset': '0'}\n\n\n>>> client.get_thread(limit=2) \n\n#OUTPUT\n# {'threads': [{'timestamps': {'update': '1544785173349'}, '_id': '95'},\n# {'timestamps': {'update': '1544751618760'}, '_id': '94'}],\n# 'size': 2,\n# 'limit': '2',\n# 'offset': '0'}\n```\n\nAnd now, send a message!\n```python\n>>> sender = client.send_sms('+5511987654321', 'Your first message') # Single SMS\n>>> if sender['ok']: # or sender['status_code'] == 200\n... print('Message sent!')\n\n# OR\n\n>>> friends_numbers = ['+5511987654321', '+5511987654322', '+5511987654323']\n>>> for friend in friends_numbers: # Bulk SMS \n... client.send_sms(friend, \"Hey, let's play BroForce!\")\n```\n\n\n\n## Attention\n\nIf you're trying to send lot of messages at once, [read this article](https://forums.androidcentral.com/google-nexus-4/227096-messaging-sending-large-amount-messages.html) about \"`Messaging is sending a large amount of messages`\".\n\nIn my tests, this notification only appears after sending 30 messages. An alternative way out for this is:\n\n```python\n>>> from rest_sms_gateway import SMSGatewayClient\n>>> import time\n>>> client = SMSGatewayClient('http://172.16.19.77:8080')\n>>> for msg_number in range(60):\n... client.send_sms('+5511987654321', 'Your msg here!')\n... if (msg_number+1) % 30 == 0:\n... # Every 30 messages, an interval of 30 seconds is given\n... time.sleep(30)\n... else:\n... # An interval of 1.5 seconds is given for each message\n... time.sleep(1.5)\n```\n\nAlso be careful with your phone carrier, they may be slow with the high demand for messages and/or send the messages out of order.\n\n\n\n## Authors\n\n\n\n* **Geraldo Castro** - *Just for fun!* - [exageraldo](https://github.com/exageraldo)\n\n\n\nSee also the list of [contributors](https://github.com/exageraldo/RestSMSGateway/contributors) who participated in this project.\n\n\n\n## License\n\n\n This project is licensed under the GNU Lesser General Public License v3 (LGPLv3) - see the [LICENSE](LICENSE) file for details\n\n\n\n## Acknowledgments\n\n * Python Community\n * [Tyrone Damasceno](https://github.com/tyronedamasceno) for trying the code and finding bugs\n * [Sedir Morais](https://github.com/sedir) for reviewing the code and finding errors.\n\n\n", "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/exageraldo/RestSMSGateway", "keywords": "python api rest sms gateway", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "rest-sms-gateway", "package_url": "https://pypi.org/project/rest-sms-gateway/", "platform": "", "project_url": "https://pypi.org/project/rest-sms-gateway/", "project_urls": { "Homepage": "https://github.com/exageraldo/RestSMSGateway" }, "release_url": "https://pypi.org/project/rest-sms-gateway/0.5.0/", "requires_dist": [ "requests (==2.20.0)" ], "requires_python": "", "summary": "", "version": "0.5.0" }, "last_serial": 4886993, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "93b37623360edd79240e0c6f5aa74679", "sha256": "13d5f077b67df2daa591d4c0e968636327dae78d262c401f3883541d278f5630" }, "downloads": -1, "filename": "rest_sms_gateway-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "93b37623360edd79240e0c6f5aa74679", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17467, "upload_time": "2018-12-20T15:33:12", "url": "https://files.pythonhosted.org/packages/d1/62/7a2cab016ac7cb057475d50b6ba481354c80de527bd1e99a0efd677d9a9e/rest_sms_gateway-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "874edd8c22e499b5c702501525465632", "sha256": "353b9c06812dbcd9f14525d680228a831cba311ae8034e0c2cd684faa570ffca" }, "downloads": -1, "filename": "rest_sms_gateway-0.2.1.tar.gz", "has_sig": false, "md5_digest": "874edd8c22e499b5c702501525465632", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19803, "upload_time": "2018-12-20T15:33:15", "url": "https://files.pythonhosted.org/packages/d7/74/536f17062d7d324d332005e90639bcda61464226a0ebd86aafe9ea521149/rest_sms_gateway-0.2.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "cfa28b3087e31a9e3372525471ba4a11", "sha256": "a4d2a64930e0bf63755372399e5b51cc0e5ea1f0c5ed40e24e5f0ff016410906" }, "downloads": -1, "filename": "rest_sms_gateway-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cfa28b3087e31a9e3372525471ba4a11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19486, "upload_time": "2019-03-01T23:03:10", "url": "https://files.pythonhosted.org/packages/0a/ed/9f59e7125c733b8e9c52924897bf5d369ca23cd08b1aa88d54f715156a39/rest_sms_gateway-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fb8df28c73c0076a14a10bbc5b9819d", "sha256": "37f07c6789493215fdd8928c543a3e5ed3b2e9c8603f730d1fa640726fcf7628" }, "downloads": -1, "filename": "rest_sms_gateway-0.5.0.tar.gz", "has_sig": false, "md5_digest": "3fb8df28c73c0076a14a10bbc5b9819d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18989, "upload_time": "2019-03-01T23:03:13", "url": "https://files.pythonhosted.org/packages/70/0e/52330e094f3fe5a89533d0fda08762a87862be3453a80be5038e8156b085/rest_sms_gateway-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cfa28b3087e31a9e3372525471ba4a11", "sha256": "a4d2a64930e0bf63755372399e5b51cc0e5ea1f0c5ed40e24e5f0ff016410906" }, "downloads": -1, "filename": "rest_sms_gateway-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cfa28b3087e31a9e3372525471ba4a11", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19486, "upload_time": "2019-03-01T23:03:10", "url": "https://files.pythonhosted.org/packages/0a/ed/9f59e7125c733b8e9c52924897bf5d369ca23cd08b1aa88d54f715156a39/rest_sms_gateway-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fb8df28c73c0076a14a10bbc5b9819d", "sha256": "37f07c6789493215fdd8928c543a3e5ed3b2e9c8603f730d1fa640726fcf7628" }, "downloads": -1, "filename": "rest_sms_gateway-0.5.0.tar.gz", "has_sig": false, "md5_digest": "3fb8df28c73c0076a14a10bbc5b9819d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18989, "upload_time": "2019-03-01T23:03:13", "url": "https://files.pythonhosted.org/packages/70/0e/52330e094f3fe5a89533d0fda08762a87862be3453a80be5038e8156b085/rest_sms_gateway-0.5.0.tar.gz" } ] }