Skip to content

SoccerExtended

SoccerExtended dataclass

Bases: SportradarAPI

Wrapper to interact with Sportradar SoccerExtended API

Source code in sportradar_api/soccer_extended/soccer_extended.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@dataclass
class SoccerExtended(SportradarAPI):
    """Wrapper to interact with Sportradar SoccerExtended API"""

    api: str = "soccer-extended"

    def get_competitions(self) -> dict:
        """Get all available Soccer competitions.

        Returns:
            API response
        """
        return self._call_endpoint(endpoint="competitions", key="competitions")

    def get_seasons(self) -> dict:
        """Get historical season information for all competitions.

        Returns:
            API response
        """
        return self._call_endpoint(endpoint="seasons", key="seasons")

    def get_season_summaries(self, season_urn: str) -> dict:
        """Get the summaries for all sport events in a season (any status). Provides information for all matches from a
        given season including scoring and statistics at the match level.

        Args:
            season_urn:

        Returns:
            API response
        """
        return self._call_endpoint(endpoint=f"seasons/{season_urn}/summaries", key="summaries")

    def get_season_competitors(self, season_urn: str) -> dict:
        """Get all teams participating for a given season.

        Args:
            season_urn: URN of a given season

        Returns:
            API response
        """
        return self._call_endpoint(endpoint=f"seasons/{season_urn}/competitors", key="season_competitors")

    def get_season_competitor_players(self, season_urn: str) -> dict:
        """Get the competitors and their players in a season. Provides player roster information for every team from a
         given season.

        Args:
            season_urn: URN of a given season

        Returns:
            API response
        """
        return self._call_endpoint(endpoint=f"seasons/{season_urn}/competitor_players", key="season_competitor_players")

    def get_player_profile(self, player_urn: str) -> dict:
        """Get the player profile for the given urn. Provides player information, including current and historical team
        membership info.

        Args:
            player_urn: URN of a given player

        Returns:
            API response
        """

        return self._call_endpoint(endpoint=f"players/{player_urn}/profile")

    def get_sport_event_summary(self, sport_event_urn: str) -> dict:
        """Get the summary of a given sport event urn, including results.

        Args:
            sport_event_urn: URN of a given sport event

        Returns:
            API response
        """
        return self._call_endpoint(endpoint=f"sport_events/{sport_event_urn}/summary")

get_competitions()

Get all available Soccer competitions.

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
12
13
14
15
16
17
18
def get_competitions(self) -> dict:
    """Get all available Soccer competitions.

    Returns:
        API response
    """
    return self._call_endpoint(endpoint="competitions", key="competitions")

get_player_profile(player_urn)

Get the player profile for the given urn. Provides player information, including current and historical team membership info.

Parameters:

Name Type Description Default
player_urn str

URN of a given player

required

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
63
64
65
66
67
68
69
70
71
72
73
74
def get_player_profile(self, player_urn: str) -> dict:
    """Get the player profile for the given urn. Provides player information, including current and historical team
    membership info.

    Args:
        player_urn: URN of a given player

    Returns:
        API response
    """

    return self._call_endpoint(endpoint=f"players/{player_urn}/profile")

get_season_competitor_players(season_urn)

Get the competitors and their players in a season. Provides player roster information for every team from a given season.

Parameters:

Name Type Description Default
season_urn str

URN of a given season

required

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
51
52
53
54
55
56
57
58
59
60
61
def get_season_competitor_players(self, season_urn: str) -> dict:
    """Get the competitors and their players in a season. Provides player roster information for every team from a
     given season.

    Args:
        season_urn: URN of a given season

    Returns:
        API response
    """
    return self._call_endpoint(endpoint=f"seasons/{season_urn}/competitor_players", key="season_competitor_players")

get_season_competitors(season_urn)

Get all teams participating for a given season.

Parameters:

Name Type Description Default
season_urn str

URN of a given season

required

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
40
41
42
43
44
45
46
47
48
49
def get_season_competitors(self, season_urn: str) -> dict:
    """Get all teams participating for a given season.

    Args:
        season_urn: URN of a given season

    Returns:
        API response
    """
    return self._call_endpoint(endpoint=f"seasons/{season_urn}/competitors", key="season_competitors")

get_season_summaries(season_urn)

Get the summaries for all sport events in a season (any status). Provides information for all matches from a given season including scoring and statistics at the match level.

Parameters:

Name Type Description Default
season_urn str
required

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
28
29
30
31
32
33
34
35
36
37
38
def get_season_summaries(self, season_urn: str) -> dict:
    """Get the summaries for all sport events in a season (any status). Provides information for all matches from a
    given season including scoring and statistics at the match level.

    Args:
        season_urn:

    Returns:
        API response
    """
    return self._call_endpoint(endpoint=f"seasons/{season_urn}/summaries", key="summaries")

get_seasons()

Get historical season information for all competitions.

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
20
21
22
23
24
25
26
def get_seasons(self) -> dict:
    """Get historical season information for all competitions.

    Returns:
        API response
    """
    return self._call_endpoint(endpoint="seasons", key="seasons")

get_sport_event_summary(sport_event_urn)

Get the summary of a given sport event urn, including results.

Parameters:

Name Type Description Default
sport_event_urn str

URN of a given sport event

required

Returns:

Type Description
dict

API response

Source code in sportradar_api/soccer_extended/soccer_extended.py
76
77
78
79
80
81
82
83
84
85
def get_sport_event_summary(self, sport_event_urn: str) -> dict:
    """Get the summary of a given sport event urn, including results.

    Args:
        sport_event_urn: URN of a given sport event

    Returns:
        API response
    """
    return self._call_endpoint(endpoint=f"sport_events/{sport_event_urn}/summary")

Last update: 2023-06-08