understatapi.endpoints.match module

Match endpoint

class understatapi.endpoints.match.MatchEndpoint(match, session)[source]

Bases: understatapi.endpoints.base.BaseEndpoint

Use 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: understatapi.parsers.base.BaseParser = <understatapi.parsers.match.MatchParser object>
__init__(match, session)[source]
Parameters
  • match (Union[List[str], str]) – Id of match(es) to get data for

  • session (Session) – The current session

property match

match id

Return type

Union[List[str], str]

_get_data(**kwargs)[source]

Get data on a per-match basis

Parameters

kwargs (str) – Keyword argument to pass to understatapi.endpoints.base.BaseEndpoint._request_url()

Return type

Response

get_shot_data(**kwargs)[source]

Get shot level data for a match

Parameters

kwargs (str) – Keyword argument to pass to understatapi.endpoints.base.BaseEndpoint._get_response()

Return type

Dict[str, Any]

get_roster_data(**kwargs)[source]

Get data about the roster for each team

Parameters

kwargs (str) – Keyword argument to pass to understatapi.endpoints.base.BaseEndpoint._get_response()

Return type

Dict[str, Any]

get_match_info(**kwargs)[source]

Get information about the match

Parameters

kwargs (str) – Keyword argument to pass to understatapi.endpoints.base.BaseEndpoint._get_response()

Return type

Dict[str, Any]