This repository has been archived by the owner on Dec 22, 2024. It is now read-only.
Releases: sixP-NaraKa/aoe2net-api-wrapper
Releases · sixP-NaraKa/aoe2net-api-wrapper
v2.0.0
Adapted implementation to incorporate new aoe2.net API functionality:
- removal of deprecated API endpoints (both general API and Nightbot API)
- adding of new (request) parameters to existing functions (where applicable)
Additionally, the API request responses are now mapped to user-friendly Python objects, which are represented via Python's 3.7+ builtin dataclasses:
from aoe2netapi import API
from aoe2netapi.constants import LeaderboardId
from aoe2netapi.models import Leaderboard # MatchHistory, RatingHistory, ...
api = API()
leaderboard: Leaderboard = api.get_leaderboard(leaderboard_id=LeaderboardId.AOE_TWO_RM, search="TheViper")
print(leaderboard)
# Leaderboard(total=42997, leaderboard_id=3, start=1, count=6,
# players=[LeaderboardPlayer(...), ...], game='aoe2de', is_event_leaderboard=False)
for player in leaderboard.players: # access to all properties via dot-notation
print(player.rank, player.name, player.rating, player.highest_rating, ...)
Therefore with this change, the Python version requirement is 3.7+.
See the documentation for more information.
v1.1.1
v1.1.0
- helper function
_get_request_response(...)
:- moved the request headers
headers = {'content-type': 'application/json;charset=UTF-8'}
outside (in the global scope)
- moved the request headers
- helper function
_is_valid_kwarg(...)
:- now explicitly returning the updated dictionary (just in case)
- additional error output, specifying which keyword arguments are possible
v1.0.0
- moved the API functions into their respective classes ('API' and 'Nightbot') - see the changelog here for more information
v0.3.0
- replaced f-strings with .format() for better backwards-compatibility
- removed logging for now, might implement it (better) in the future
v0.2.0
- bug fix(es)
- documentation changes (to reflect that)
- see newly created changelog here: https://github.com/sixP-NaraKa/aoe2net-api-wrapper/blob/main/docs/changelog.md
v0.1.0
initial release/tag