Skip to content

Sport

SportUseCase

Bases: AbstractUseCase

Use case for sports

check_proactivity()

Check if there is a proactivity to be triggered

  • TODO: Why is it necessary to check if valid_teams is None twice?

choose_league(leagues)

Returns the league the users chooses.

  • TODO: Refactor by using print_options and get_int

Returns:

Type Description
str

The league the user chooses.

choose_team(teams)

Returns the team the users chooses.

  • TODO: Refactor by using print_options and get_int

Returns:

Type Description
str

The team the user chooses.

get_matchday_num(max_num)

Returns the matchday number the user chooses.

  • TODO: Refactor by using print_options and get_int

Parameters:

Name Type Description Default
max_num int

The maximum number of matchdays.

required

Returns:

Type Description
int

The matchday number the user chooses.

trigger_assistant(best_match)

UseCase for sport

  • TODO: Implement quotes_key
  • TODO: Fix typing (remove type ignore)
  • TODO: Refactor try except blocks to only include the api call

Parameters:

Name Type Description Default
best_match BestMatch

An object containing the best match for the user input.

required

Raises:

Type Description
NotImplementedError

If the given key was not found in the match case statement for implemented functions, or if the function is not implemented yet.