Name | gameeapi JSON |
Version |
1.0.2
JSON |
| download |
home_page | None |
Summary | An unofficial API wrapper for gamee.com. |
upload_time | 2024-09-22 07:23:53 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
gamee
gamee-api
telegram
telegrambot
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# gameeapi
An unofficial API wrapper for gamee.com written in Python.
# Installation
Installing through pip:
```bash
pip install gameeapi
```
Installing through source:
```bash
git clone https://github.com/zrekryu/gameeapi.git
cd gameeapi
pip install .
```
# Gamee API
## Initializing API Client
To initialize the API Client:
```py
from gameeapi import GameeAPIClient
client: GameeAPIClient = GameeAPIClient()
```
## Version Information
To print the version of the `gameeapi` library:
```py
from gameeapi import __version__
print(__version__)
```
## Authorizing user
To authorize the user:
```py
from typing import Any
game_url: str = "<game-url>"
auth_data: dict[str, Any] = await client.auth_user(game_url)
Print the authentication token and save it for later use.
print("Authentication Token:", auth_data["result"]["tokens"]["authenticate"])
```
## Get Web Gameplay Details
To retrieve web gameplay details:
```py
game_url: str = "<game-url>"
gameplay_details: dict[str, Any] = await client.get_web_gameplay_details(game_url)
print(gameplay_details)
```
## Get Geographical Block Status
To retrieve geographical block status:
```py
auth_token: str = "<auth-token>"
geo_block_status: dict[str, Any] = await client.get_geo_block_status(auth_token)
print(geo_block_status)
```
## Get Web Surrounding by Game
To get web surrounding by the game:
```py
game_url: str = "<game-url>"
auth_token: str = "<auth-token>"
game_surrounding: dict[str, Any] = await client.get_web_surrounding_by_game(auth_token, game_url)
print(game_surrounding)
```
## Save Web Gameplay
To save web gameplay score:
```py
auth_token: str = "<auth-token>"
game_url: str = "<game-url>"
score: int = 100
play_time: int = 120
gameplay_data: dict[str, Any] = await client.save_web_gameplay(auth_token, game_url, score, play_time)
print(gameplay_data)
```
# License
© 2024 Zrekryu. Licensed under MIT License. See the LICENSE file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "gameeapi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "gamee, gamee-api, telegram, telegrambot",
"author": null,
"author_email": "Zrekryu <zrekryu@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/95/fc/0d12d5433bff1bc0eeae3cd156a67e8ba28a7fca1f9c81ece13ebc0e4f17/gameeapi-1.0.2.tar.gz",
"platform": null,
"description": "# gameeapi\n\nAn unofficial API wrapper for gamee.com written in Python.\n\n# Installation\n\nInstalling through pip:\n```bash\npip install gameeapi\n```\n\nInstalling through source:\n```bash\ngit clone https://github.com/zrekryu/gameeapi.git\ncd gameeapi\npip install .\n```\n\n# Gamee API\n\n## Initializing API Client\n\nTo initialize the API Client:\n```py\nfrom gameeapi import GameeAPIClient\n\nclient: GameeAPIClient = GameeAPIClient()\n```\n\n## Version Information\n\nTo print the version of the `gameeapi` library:\n```py\nfrom gameeapi import __version__\n\nprint(__version__)\n```\n\n## Authorizing user\n\nTo authorize the user:\n```py\nfrom typing import Any\n\ngame_url: str = \"<game-url>\"\nauth_data: dict[str, Any] = await client.auth_user(game_url)\n\nPrint the authentication token and save it for later use.\nprint(\"Authentication Token:\", auth_data[\"result\"][\"tokens\"][\"authenticate\"])\n```\n\n## Get Web Gameplay Details\n\nTo retrieve web gameplay details:\n```py\ngame_url: str = \"<game-url>\"\ngameplay_details: dict[str, Any] = await client.get_web_gameplay_details(game_url)\nprint(gameplay_details)\n```\n\n## Get Geographical Block Status\n\nTo retrieve geographical block status:\n```py\nauth_token: str = \"<auth-token>\"\ngeo_block_status: dict[str, Any] = await client.get_geo_block_status(auth_token)\nprint(geo_block_status)\n```\n\n## Get Web Surrounding by Game\n\nTo get web surrounding by the game:\n```py\ngame_url: str = \"<game-url>\"\nauth_token: str = \"<auth-token>\"\ngame_surrounding: dict[str, Any] = await client.get_web_surrounding_by_game(auth_token, game_url)\nprint(game_surrounding)\n```\n\n## Save Web Gameplay\n\nTo save web gameplay score:\n```py\nauth_token: str = \"<auth-token>\"\ngame_url: str = \"<game-url>\"\nscore: int = 100\nplay_time: int = 120\n\ngameplay_data: dict[str, Any] = await client.save_web_gameplay(auth_token, game_url, score, play_time)\nprint(gameplay_data)\n```\n\n# License\n\n\u00a9 2024 Zrekryu. Licensed under MIT License. See the LICENSE file for details.",
"bugtrack_url": null,
"license": null,
"summary": "An unofficial API wrapper for gamee.com.",
"version": "1.0.2",
"project_urls": {
"Issues": "https://github.com/zrekryu/gamee-api/issues",
"Repository": "https://github.com/zrekryu/gamee-api"
},
"split_keywords": [
"gamee",
" gamee-api",
" telegram",
" telegrambot"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "184517adaa3227070ca3fc0356cef7674b4ccb98f41038cdb6aa9a2f276436b9",
"md5": "21f64e7b3945486f3c4649d2895edc81",
"sha256": "9ac458f15c70f438a44ed9c0e66698f79121ea6f885fe9e78981c8bf046743d0"
},
"downloads": -1,
"filename": "gameeapi-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "21f64e7b3945486f3c4649d2895edc81",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 4030,
"upload_time": "2024-09-22T07:23:51",
"upload_time_iso_8601": "2024-09-22T07:23:51.978512Z",
"url": "https://files.pythonhosted.org/packages/18/45/17adaa3227070ca3fc0356cef7674b4ccb98f41038cdb6aa9a2f276436b9/gameeapi-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "95fc0d12d5433bff1bc0eeae3cd156a67e8ba28a7fca1f9c81ece13ebc0e4f17",
"md5": "ac0d6f50fe33448c3e19c6da66b79390",
"sha256": "cfe97b7ff2097fc19667a45137badd63361ee779372f2ab3194fefae3781709e"
},
"downloads": -1,
"filename": "gameeapi-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "ac0d6f50fe33448c3e19c6da66b79390",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 3707,
"upload_time": "2024-09-22T07:23:53",
"upload_time_iso_8601": "2024-09-22T07:23:53.628649Z",
"url": "https://files.pythonhosted.org/packages/95/fc/0d12d5433bff1bc0eeae3cd156a67e8ba28a7fca1f9c81ece13ebc0e4f17/gameeapi-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-22 07:23:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zrekryu",
"github_project": "gamee-api",
"github_not_found": true,
"lcname": "gameeapi"
}