Skip to content

Releases: sixP-NaraKa/aoe2net-api-wrapper

v2.0.0

21 Jan 00:40
Compare
Choose a tag to compare

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

07 Nov 14:43
Compare
Choose a tag to compare
  • (#2) adjusted documentation (method docstrings + overall documentation under docs/docs.md) to incorporate new 'Empire Wars' game modes (leaderboard IDs)

v1.1.0

10 Apr 15:09
Compare
Choose a tag to compare
  • helper function _get_request_response(...):
    • moved the request headers headers = {'content-type': 'application/json;charset=UTF-8'} outside (in the global scope)
  • 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

30 Dec 21:02
Compare
Choose a tag to compare
  • moved the API functions into their respective classes ('API' and 'Nightbot') - see the changelog here for more information

v0.3.0

24 Nov 18:05
Compare
Choose a tag to compare
  • replaced f-strings with .format() for better backwards-compatibility
  • removed logging for now, might implement it (better) in the future

v0.2.0

09 Nov 19:07
Compare
Choose a tag to compare

v0.1.0

07 Nov 17:59
Compare
Choose a tag to compare

initial release/tag