kickerde_api_client.api

The primary module in kickerde_api_client.

Attributes

logger

Classes

Api

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:
async leagues()

Returns all leagues and tournaments known to the system.

Returns:

a dictionary of League objects, 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 League object.

Returns:

a dictionary of Season objects, 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:
Returns:

a LeagueSeason object.

Return type:

kickerde_api_client.model.LeagueSeason

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 Team object.

Returns:

a MyTeamSync object.

Return type:

kickerde_api_client.model.MyTeamSync

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 League object.

Return type:

None

async dump_league_season(league, season)

Dumps a LeagueSeason object to stdout in JSON format.

Parameters:
Return type:

None

async dump_my_team_sync(team)

Dumps a MyTeamSync object to stdout in JSON format.

Parameters:

team (kickerde_api_client.model.Team | kickerde_api_client.model.TeamId) – the ID of the team. Alternatively, a Team object.

Return type:

None