Name | groupme-push JSON |
Version |
0.0.3
JSON |
| download |
home_page | |
Summary | GroupMe push service wrapper |
upload_time | 2023-12-21 01:21:41 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | GPL-3.0-or-later |
keywords |
groupme
push
websocket
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Groupme Push Client
This is a simple client for the [GroupMe push service](https://dev.groupme.com/tutorials/push) (Faye).
## Installation
run `pip install groupme-push`, or clone the repo and run `pip install .`
## Usage
import `from groupme_push.client import PushClient`
PushClient has a couple of paramaters:
- **access_token** - GroupMe access token for the user that you want to listen for
- **on_message** - a function to call whenver there is a new message in any group the user is in
- **on_dm** - callback for DMs
- **on_like** - callback for when another user likes a message
- **on_favorite** - callback for when your user likes a message
- **on_other** - for any other type of message, such as poll results
- **disregard_self** - if the listener should disregard messages originating from the user
create a PushClient object with
`client = PushClient(access_token=groupme_access_token)`
to start listening, use `client.start()`, and to stop use `client.stop()`
to start listening to a group, use `client.subscribe_to_group(groupid)`. Note that this *should* allow you to see when users are typing, but currently appears to provide no extra information.
## Example
```python
from groupme_push.client import PushClient
import time
import logging
def on_message(message):
print(message["text"])
groupme_access_token = "useraccesstoken"
logging.basicConfig(level=logging.DEBUG)
client = PushClient(access_token=groupme_access_token, on_message=on_message)
client.start()
```
## Issues
If you encounter any bugs or have feature requests, [please open an issue on GitHub](https://github.com/cuuush/groupme-push/issues)
Raw data
{
"_id": null,
"home_page": "",
"name": "groupme-push",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "groupme,push,websocket",
"author": "",
"author_email": "Chris Cush <chris@cuuush.com>",
"download_url": "https://files.pythonhosted.org/packages/94/de/7360e0084abc6db16099e6eaa418517234e421821534ab412cf921158e9b/groupme-push-0.0.3.tar.gz",
"platform": null,
"description": "\r\n# Groupme Push Client\r\n\r\nThis is a simple client for the [GroupMe push service](https://dev.groupme.com/tutorials/push) (Faye).\r\n\r\n## Installation\r\nrun `pip install groupme-push`, or clone the repo and run `pip install .`\r\n\r\n## Usage\r\nimport `from groupme_push.client import PushClient`\r\n\r\nPushClient has a couple of paramaters:\r\n- **access_token** - GroupMe access token for the user that you want to listen for\r\n- **on_message** - a function to call whenver there is a new message in any group the user is in\r\n- **on_dm** - callback for DMs \r\n- **on_like** - callback for when another user likes a message\r\n- **on_favorite** - callback for when your user likes a message\r\n- **on_other** - for any other type of message, such as poll results\r\n- **disregard_self** - if the listener should disregard messages originating from the user\r\n\r\ncreate a PushClient object with \r\n`client = PushClient(access_token=groupme_access_token)`\r\n\r\nto start listening, use `client.start()`, and to stop use `client.stop()`\r\n\r\nto start listening to a group, use `client.subscribe_to_group(groupid)`. Note that this *should* allow you to see when users are typing, but currently appears to provide no extra information.\r\n## Example\r\n```python\r\nfrom groupme_push.client import PushClient\r\nimport time\r\nimport logging\r\n\r\ndef on_message(message):\r\n\tprint(message[\"text\"])\r\n\r\ngroupme_access_token = \"useraccesstoken\"\r\nlogging.basicConfig(level=logging.DEBUG)\r\n\r\nclient = PushClient(access_token=groupme_access_token, on_message=on_message)\r\n\r\nclient.start()\r\n```\r\n## Issues\r\nIf you encounter any bugs or have feature requests, [please open an issue on GitHub](https://github.com/cuuush/groupme-push/issues)\r\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "GroupMe push service wrapper",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/cuuush/groupme-push"
},
"split_keywords": [
"groupme",
"push",
"websocket"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "35091fceff6b108dd2a562e60e3b190ba1cbf240be451084a593c0d04e9873b0",
"md5": "2bfa695dddde809d8edc12678c28a922",
"sha256": "def04d3d34661e23cf15a8b68f5564f7d8291eedb75ad4dfe57fcbb3b0289ff0"
},
"downloads": -1,
"filename": "groupme_push-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2bfa695dddde809d8edc12678c28a922",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 16703,
"upload_time": "2023-12-21T01:21:39",
"upload_time_iso_8601": "2023-12-21T01:21:39.620759Z",
"url": "https://files.pythonhosted.org/packages/35/09/1fceff6b108dd2a562e60e3b190ba1cbf240be451084a593c0d04e9873b0/groupme_push-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "94de7360e0084abc6db16099e6eaa418517234e421821534ab412cf921158e9b",
"md5": "3483bd54208530ad3e9108f1016d72e8",
"sha256": "1b72c0ea52e346142b6edd07bfc464467483f60e5069ff2790ea2473ef756d61"
},
"downloads": -1,
"filename": "groupme-push-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "3483bd54208530ad3e9108f1016d72e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 16421,
"upload_time": "2023-12-21T01:21:41",
"upload_time_iso_8601": "2023-12-21T01:21:41.439305Z",
"url": "https://files.pythonhosted.org/packages/94/de/7360e0084abc6db16099e6eaa418517234e421821534ab412cf921158e9b/groupme-push-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-21 01:21:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cuuush",
"github_project": "groupme-push",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "groupme-push"
}