bundesliga_tippspiel_reminder package¶
Subpackages¶
Submodules¶
bundesliga_tippspiel_reminder.BundesligaTippspielReminderBot module¶
-
class
bundesliga_tippspiel_reminder.BundesligaTippspielReminderBot.
BundesligaTippspielReminderBot
(connection: bokkichat.connection.Connection.Connection, location: str, db_uri: Optional[str] = None)¶ Bases:
kudubot.Bot.Bot
The bundesliga tippspiel reminder bot
-
bg_iteration
(_: int, db_session: sqlalchemy.orm.session.Session)¶ Implements behaviours of the Background thread that periodically checks if any reminders are due :return: None
-
property
bg_pause
¶ The pause between background iterations :return: The pause in seconds
Checks if a user is authorized :param address: The user to check :param _: possible command arguments :param db_session: The database session to use :return: True if authorized, False otherwise
-
classmethod
name
() → str¶ - Returns
The name of the bot
-
classmethod
parsers
() → List[kudubot.parsing.CommandParser.CommandParser]¶ - Returns
The parsers for the bot
- Returns
A custom message sent to a user if they tried to access a feature that requires authorization without being authorized
-
classmethod
version
() → str¶ - Returns
The current version of the bot
-
bundesliga_tippspiel_reminder.BundesligaTippspielReminderParser module¶
-
class
bundesliga_tippspiel_reminder.BundesligaTippspielReminderParser.
BundesligaTippspielReminderParser
¶ Bases:
kudubot.parsing.CommandParser.CommandParser
Parser for the bot that defines the available commands
-
classmethod
commands
() → List[kudubot.parsing.Command.Command]¶ - Returns
The available commands
-
classmethod
name
() → str¶ - Returns
The name of the bot
-
classmethod
bundesliga_tippspiel_reminder.api module¶
Checks whether or not an API key is authorized :param api_key: The API key to check :return: True if authorized, False otherwise
-
bundesliga_tippspiel_reminder.api.
api_request
(endpoint: str, method: str, params: Dict[Any, Any], api_key: Optional[str] = None) → Dict[Any, Any]¶ Sends a request to the API :param endpoint: The endpoint to send the request to :param method: The HTTP method to use :param params: The parameters to use :param api_key: The API key to use :return: The response