kickerde_api_client.api
The primary module in kickerde_api_client.
Attributes
Classes
The primary API client and entry point for all requests. |
Module Contents
- kickerde_api_client.api.logger
- class kickerde_api_client.api.Api(http_client=None, provider=None)
The primary API client and entry point for all requests.
- Parameters:
http_client (httpx.AsyncClient | None) –
provider (kickerde_api_client.provider.ResponseProvider | None) –
- async leagues()
Returns all leagues and tournaments known to the system.
- Returns:
a dictionary of
Leagueobjects, indexed by league ID.- Return type:
dict[kickerde_api_client.model.LeagueId, kickerde_api_client.model.League]
- async seasons(league)
Returns all known seasons for the given league or tournament.
- Parameters:
league (kickerde_api_client.model.League | kickerde_api_client.model.LeagueId) – the ID of the league or tournament. Alternatively, a
Leagueobject.- Returns:
a dictionary of
Seasonobjects, indexed by season ID.- Return type:
dict[kickerde_api_client.model.SeasonId, kickerde_api_client.model.Season]
- async league_season(league, season)
Returns an informational structure for the given league and season. Aside from league properties, the structure contains dictionaries that provide info on teams and match days (aka gamedays).
- Parameters:
league (kickerde_api_client.model.League | kickerde_api_client.model.LeagueId) – the ID of the league or tournament. Alternatively, a
Leagueobject.season (kickerde_api_client.model.Season | kickerde_api_client.model.SeasonId) – the ID of the season. Alternatively, a
Seasonobject.
- Returns:
a
LeagueSeasonobject.- Return type:
- async my_team_sync(team)
Returns an informational structure for live and upcoming matches played by the given team.
- Parameters:
team (kickerde_api_client.model.Team | kickerde_api_client.model.TeamId) – the ID of the team. Alternatively, a
Teamobject.- Returns:
a
MyTeamSyncobject.- Return type:
- async dump_leagues()
Dumps all leagues to stdout in JSON format.
- Return type:
None
- async dump_seasons(league)
Dumps all seasons to stdout in JSON format.
- Parameters:
league (kickerde_api_client.model.League | kickerde_api_client.model.LeagueId) – the ID of the league or tournament. Alternatively, a
Leagueobject.- Return type:
None
- async dump_league_season(league, season)
Dumps a
LeagueSeasonobject to stdout in JSON format.- Parameters:
league (kickerde_api_client.model.League | kickerde_api_client.model.LeagueId) – the ID of the league or tournament. Alternatively, a
Leagueobject.season (kickerde_api_client.model.Season | kickerde_api_client.model.SeasonId) – the ID of the season. Alternatively, a
Seasonobject.
- Return type:
None
- async dump_my_team_sync(team)
Dumps a
MyTeamSyncobject to stdout in JSON format.- Parameters:
team (kickerde_api_client.model.Team | kickerde_api_client.model.TeamId) – the ID of the team. Alternatively, a
Teamobject.- Return type:
None