Simple API wrapper for the AFK Arena site https://cdkey.lilith.com/afk-global.
Project description
AFK Arena API.
Simple API wrapper for the AFK Arena site https://cdkey.lilith.com/afk-global.
Note: This wrapper is unofficial and is not associated with nor endorsed by Lilith Games.
The logic of this library has been part of my Discord bot, Dreaf, ever since AFK Arena changed to the external gift code redemption site. Due to the increased interest of community members on making use of this unofficial API, and the fact that this logic is currently being used across two seperate projects of my own, I figured it's time to make the API interactions standalone to ease maintenance and keep the feature scope focused on the essentials of its functionality.
Install
pip install afkarena
Requirements
- Python 3.9+
- aiohttp 3.7+
How to use
# create a Player object for the main user account.
player = Player(main_user_id)
# authenticate using the authentication code in game settings.
await player.verify(authentication_code)
# fetch data of all linked user accounts
await player.fetch_users()
# redeem one or more gift codes for all linked user accounts
results = await player.redeem_codes(gift_code_one, gift_code_two)
# view code redemption results
print(results)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file afkarena-0.2.0.tar.gz.
File metadata
- Download URL: afkarena-0.2.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.5 Linux/5.12.8-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff8655645936d6b7135da4a0816c0c1eda6e68f218a4f28b4343d5426f37343
|
|
| MD5 |
851308cab90753c9b0d8280dda7e729a
|
|
| BLAKE2b-256 |
ea9d761ec3a8ada91b7d8227c3f6c1fae9f08e64903356a808b06c3863796737
|
File details
Details for the file afkarena-0.2.0-py3-none-any.whl.
File metadata
- Download URL: afkarena-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.5 Linux/5.12.8-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
091eb05b836d4f9a2e89845f78a647bbdc708b73675f0853f57b51dc71334288
|
|
| MD5 |
858e4b2b87b3515f4098b0ee004c26c1
|
|
| BLAKE2b-256 |
8e2af15bcf1f85fe65268f91f1e98a64bfd5736e38feeb1882c97d58c8cc7447
|