Skip to content

Sport

Basketball

get_nba_standings()

Get the current standings of the NBA

Returns:

Type Description
list[list[str]] | None

List of the standings of both eastern and western conference

get_nba_teams()

Get all NBA teams

Returns:

Type Description
list[str] | None

List of all NBA teams

get_team_game_today(team_name)

Get the game of a team today

Parameters:

Name Type Description Default
team_name str

Name of the team for which a game is to be returned

required

Returns:

Type Description
list[str] | None

Return list with the game of the team on the current day

get_team_id(team_name)

Get the id of a team

Parameters:

Name Type Description Default
team_name str

Name of the team for which an id is to be returned

required

Returns:

Type Description
int | None

description

F1

get_results_by_round(year, round_num)

Get f1 results by round

Parameters:

Name Type Description Default
year int

Year of the season in which the race took place

required
round_num int

Number of the race in the season

required

Returns:

Type Description
list[str] | None

Returns a list of strings with the results

get_results_last_round()

Get results of last round

Returns:

Type Description
list[str] | None

Returns a list of strings with the results of the last round

get_results_next_round()

Get information about the next round

Returns:

Type Description
list[str] | None

Returns a list of strings with information about the next round

Football

convert_league_name(name)

Converts the name of the league to the code used by the API

Parameters:

Name Type Description Default
name str

Name of the league

required

Returns:

Type Description
str | None

Return id of the league

get_current_team_match(league, team_name)

Get the current match of the specified team

Parameters:

Name Type Description Default
league str

Name of the league

required
team_name str

Name of the team from which the match is requested

required

Returns:

Type Description
list[str] | None

Return list of the current match of the specified team

get_league_standings(league)

Get the standings of the league

Parameters:

Name Type Description Default
league str

Name of the league

required

Returns:

Type Description
list[str] | None

Return list of the standings

get_matchday_matches(league, matchday)

Get the matches of the specified matchday

Parameters:

Name Type Description Default
league str

Name of the league

required
matchday int

Number of the matchday

required

Returns:

Type Description
list[str] | None

Return list of the matches on that matchday

get_matches_today(league='')

Get the matches that are being played today

Parameters:

Name Type Description Default
league str, optional

Name of the league. By default "".

''

Returns:

Type Description
list[str] | None

List of the matches on the current day in the specified league

get_ongoing_matches(league='')

Get the ongoing matches in the specified league

Parameters:

Name Type Description Default
league str, optional

Name of the league. By default "".

''

Returns:

Type Description
list[str] | None

List of the ongoing matches in the specified league

get_teams(league)

Get the teams of the specified league

Parameters:

Name Type Description Default
league str

Name of the league

required

Returns:

Type Description
list[str | int] | None

Return list of the teams of the specified league

get_upcoming_team_matches(league, team_name, num_matches=3)

Get the upcoming matches of the specified team

Parameters:

Name Type Description Default
league str

Name of the league

required
team_name str

Name of the team from which the matches are requested

required
num_matches int, optional

Number of matches which will be returned. By default 3.

3

Returns:

Type Description
list[str] | None

Return list of the upcoming matches of the specified team

Handball

get_league_id(league_name)

Get league id from league name

Parameters:

Name Type Description Default
league_name str

Name of the league

required

Returns:

Type Description
int | None

Return the id of the league

get_league_table(league_name='Bundesliga')

Get the league table of a league

Parameters:

Name Type Description Default
league_name str, optional

Name of the league for which a table is returned. By default Bundesliga.

'Bundesliga'

Returns:

Type Description
list[str] | None

Return a list of strings with the league table

get_league_teams(league_name)

Get the league teams of a league

Parameters:

Name Type Description Default
league_name str

Name of the league for which the teams are returned

required

Returns:

Type Description
list[str] | None

Return a list of strings with the teams in the league

get_team_game_today(team_name, league_name='Bundesliga')

Get the game of a team today

Parameters:

Name Type Description Default
team_name str

Name of the team for which the game is to be returned

required
league_name str, optional

Name of the league in which the game is to be played. By default Bundesliga.

'Bundesliga'

Returns:

Type Description
list[str] | None

Return a list of a string with the game

get_team_id(team_name)

Get team id from team name

Parameters:

Name Type Description Default
team_name str

Name of the team for which the id is to be returned

required

Returns:

Type Description
int | None

Return the id of the team