understatapi.endpoints.match module¶
Match endpoint
- class understatapi.endpoints.match.MatchEndpoint(match, session)[source]¶
Bases:
BaseEndpointUse this class to get data from a url of the form
https://understat.com/match/<match_id>- Example
>>> session = requests.Session() >>> match_ids = ["123", "456"] >>> for match in MatchEndpoint(match_ids, session=session): ... print(match.match) 123 456
- parser: BaseParser = <understatapi.parsers.match.MatchParser object>¶
- __init__(match, session)[source]¶
- Parameters
match (
Union[List[str],str]) – Id of match(es) to get data forsession (
Session) – The current session
- property match: Union[List[str], str]¶
match id
- Return type
Union[List[str],str]
- _get_data(**kwargs)[source]¶
Get data on a per-match basis via AJAX endpoint.
- Parameters
kwargs (
Any) – Keyword argument to pass tounderstatapi.endpoints.base.BaseEndpoint._request_ajax()- Return type
Dict[str,Any]- Returns
Dictionary with keys: rosters, shots, tmpl
- get_shot_data(**kwargs)[source]¶
Get shot level data for a match
- Parameters
kwargs (
Any) – Keyword argument to pass tounderstatapi.endpoints.base.BaseEndpoint._request_ajax()- Return type
Dict[str,Any]
- get_roster_data(**kwargs)[source]¶
Get data about the roster for each team
- Parameters
kwargs (
Any) – Keyword argument to pass tounderstatapi.endpoints.base.BaseEndpoint._request_ajax()- Return type
Dict[str,Any]
- get_match_info(**kwargs)[source]¶
Get information about the match
- Parameters
kwargs (
Any) – Keyword argument to pass tounderstatapi.endpoints.base.BaseEndpoint._request_ajax()- Return type
Dict[str,Any]