
Returns: A list of RatingTimePoint validated objects, each one encapsulating data at a certain point in time corresponding to a match played by the player, including the rating, timestamp of the match, streaks etc. Aoe2NetException: if the not one of 'steam_id' or 'profile_id' are provided. Age of Empires II: DE features The Last Khans with 3 new campaigns and 4 new Civilizations. Raises: Aoe2NetException: if the 'count' parameter exceeds 10 000. Age of Empires II: Definitive Edition celebrates the 20th anniversary of one of the most popular strategy games ever, now with stunning 4K Ultra HD graphics, and a fully remastered soundtrack. profile_id (int): The player's profile ID (ex: 459658). count (int): number of matches to get the rating for (must be 1000 or less).

start (int): starting match (0 is the most recent match). leaderboard_id (int): Leaderboard to extract the data for (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4). Possibilities are 'aoe2hd' (Age of Empires 2: HD Edition) and 'aoe2de' (Age of Empires 2: Definitive Edition). Args: game (str): The game for which to extract the list of strings. Either 'steam_id' or 'profile_id' required. debug ( "Preparing parameters for strings query" ) query_params = '" ) return parse_obj_as ( List, processed_response ) def rating_history ( self, game : str = "aoe2de", leaderboard_id : int = 3, start : int = 0, count : int = 20, steam_id : int = None, profile_id : int = None, ) -> List : """ Requests the rating history for a player. Returns: A StringsResponse validated object encapsulating the strings used by the API. timeout = timeout def _repr_ ( self ) -> str : return f "Client for " def strings ( self, game : str = "aoe2de" ) -> StringsResponse : """ Requests a list of strings used by the API. """ API_BASE_URL : str = "" STRINGS_ENDPOINT : str = API_BASE_URL + "/strings" LEADERBOARD_ENDPOINT : str = API_BASE_URL + "/leaderboard" LOBBIES_ENDPOINT : str = API_BASE_URL + "/lobbies" LAST_MATCH_ENDPOINT : str = API_BASE_URL + "/player/lastmatch" MATCH_HISTORY_ENDPOINT : str = API_BASE_URL + "/player/matches" RATING_HISTORY_ENDPOINT : str = API_BASE_URL + "/player/ratinghistory" MATCHES_ENDPOINT : str = API_BASE_URL + "/matches" MATCH_ENDPOINT : str = API_BASE_URL + "/match" NUMBER_ONLINE_ENDPOINT : str = API_BASE_URL + "/stats/players" def _init_ ( self, timeout : Union ] = 5 ): """Creating a Session for connection pooling since we're always querying the same host.""" self. Each method in this class corresponds name for name to an endpoint, and will do the work in querying then parsing and validating the response before returning it.

""" from typing import Any, Dict, List, Tuple, Union import requests from loguru import logger from pydantic import parse_obj_as from aoe2netwrapper.exceptions import Aoe2NetException from aoe2netwrapper.models import ( LastMatchResponse, LeaderBoardResponse, MatchLobby, NumOnlineResponse, RatingTimePoint, StringsResponse, ) class AoE2NetAPI : """ The 'AoE2NetAPI' class is a client that encompasses the API endpoints. You can also experience new Civilizations and Campaigns with the Lords of the West DLC! Recent updates include a Battle Royale game mode, ongoing support for the Scenario Editor, Quick Play for easy social games, enhancements to the game UI, and more!Ĭhoose your path to greatness with an eye-catching and engaging remaster to one of the most beloved strategy games of all time.""" aoe2netwrapper.api - This module implements a high-level client to query the API at. Head online to challenge other players in your quest for world domination with 35 different Civilizations. With over 200 hours of gameplay and 1,000 years of human history, improved experiences await. Frequent updates include events, additional content, new game modes, and enhanced features with the recent addition of Co-Op mode!Įxplore all the original Campaigns and the best-selling expansions like never before.


Age of Empires II: DE features “The Last Khans” with 3 new campaigns and 4 new Civilizations. Age of Empires II: Definitive Edition celebrates the 20th anniversary of one of the most popular strategy games ever, now with stunning 4K Ultra HD graphics, and a fully remastered soundtrack.
