aoe2net-api-wrapper
A simple and basic Python 3 https://aoe2.net/ API wrapper for sending GET requests.
See the documentation of the API wrapper here on GitHub: section 'Documentation'.
See https://aoe2.net/#api and https://aoe2.net/#nightbot for the aoe2.net API (documentation) directly.
Requirements:
requests>= 2.20.0dataclasses-json== 0.5.7- Python 3.7+ required
Installation
Available on PyPi
pip install aoe2netapi-wrapper
Example usage
from aoe2netapi import API, Nightbot
from aoe2netapi.constants import LeaderboardId, EventLeaderboardId
from aoe2netapi.models import Leaderboard
# API class
api = API()
leaderboard: Leaderboard = api.get_leaderboard(leaderboard_id=LeaderboardId.AOE_TWO_RM, count=100)
print(leaderboard)
# Leaderboard<total = 43055, leaderboard_id = 3, start = 1, count = 100, players = [...],
# game="aoe2de", is_event_leaderboard=False
for player in leaderboard.players: # player is of type 'LeaderboardPlayer'
print(player.rank, player.name, player.rating, player.highest_rating, ...)
# Nighbot class
nightbot = Nightbot()
rating_history: str = nightbot.get_current_or_last_match(leaderboard_id=LeaderboardId.AOE_TWO_RM, search="GL.TheViper")
print(rating_history)
# GL.TheViper (2688) Rank #4, has played 1,542 games with a 65% winrate, -1 streak, and 4 drops
Documentation
See the documentation on the provided functions here on GitHub: documentation page.
For the documentation for previous versions, see the documentation page here: documentation page.
Changelog
See the changelog here on GitHub: changelog page.
License
MIT License. See LICENSE.
Metadata
Release files for aoe2netapi-wrapper 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aoe2netapi-wrapper-2.0.0.tar.gz | 10.3 kB | Without provenance | Details for aoe2netapi-wrapper-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aoe2netapi_wrapper-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for aoe2netapi_wrapper-2.0.0-py3-none-any.whl |
Total release size: 22.7 kB
Release files / aoe2netapi-wrapper-2.0.0.tar.gz
| Download URL | aoe2netapi-wrapper-2.0.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4a5ba0038aa70bc3f4c96a683702f62937f66e03e27428498f6583db2fb6c85
|
|
BLAKE2b-256 checksum How to use checksums |
315dfe988ffd4d724128da04aa4d700c4922314e53d6abe2dbb93657f948865a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Release files / aoe2netapi_wrapper-2.0.0-py3-none-any.whl
| Download URL | aoe2netapi_wrapper-2.0.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d6abccc2414dfde4a50298aaf0c302c7b35a672ab439b80841093603c26ca80
|
|
BLAKE2b-256 checksum How to use checksums |
262c9449b16404b9dd99c56c637424dddb282e59a4d68608a01e80dd53048185
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
|
Security for aoe2netapi-wrapper 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.