View Source F1Bot (f1_bot v0.7.0)
API for retrieving data between different system components.
Link to this section Summary
Functions
Returns true if demo mode is enabled.
Returns configured demo mode URL or nil if not configured.
Same as driver_info_by_number/1 but takes the driver's 3-letter abbreviation
Returns information about the driver with the given number such as their name, picture URL, team, and team color.
Returns the list of drivers in the current session.
Returns full session data from the DriverDataRepo for the driver with the given number.
Contains all laps, stints and other data collected about the driver in this session.
Returns the race summary of the driver with the given number which contains the driver's stints, top speed, best and average lap times, and best and average sector times.
Fast-forwards the session replay started with replay_session_live/2
by a given number of seconds.
Same as get_env/2 but returns an ok tuple or :error.
Gets a configuration value for F1Bot application.
Returns an ok-wrapped boolean indicating whether the current session is a race or another type of session (FP/Q). Returns an error if the session info is not available.
Returns the current lap number.
Fetches session archives from a given URL, silently replays them, and replaces the current session with the replayed session. Useful for testing and restoring data from the last session on server restart.
Similar to reload_session/2, but replays the session in live,
as if the session was currently in progress (equivalent to demo mode).
Useful for development and debugging.
Resets the session state and clears all caches
Emits all known events from the current session state to the event bus to (1) update the delayed events caches (which are used on the website) and (2) synchronize the state of all connected Phoenix clients. This includes events such as session information, driver list, and session summaries for all drivers.
Returns the best lap time, best sector times, and top speed in this session.
Returns the current session clock - time remaining in qualifying and FP sessions or time left on the 2h timer during races.
Returns a copy of the current F1Session session state for analysis.
Returns information about the session such as the session type (FP/Q/R) and name.
Returns the current session status (e.g. started, in progress, ended)
Stops the session replay started with replay_session_live/2.
Downloads all available session archives and caches them locally. You shouldn't need to call this function directly, as the archives are cached automatically when they are first accessed.
Returns a history of track status changes (safety cars, red flags, etc.)
Link to this section Functions
Returns true if demo mode is enabled.
Returns configured demo mode URL or nil if not configured.
Same as driver_info_by_number/1 but takes the driver's 3-letter abbreviation
Returns information about the driver with the given number such as their name, picture URL, team, and team color.
Returns the list of drivers in the current session.
Returns full session data from the DriverDataRepo for the driver with the given number.
Contains all laps, stints and other data collected about the driver in this session.
Returns the race summary of the driver with the given number which contains the driver's stints, top speed, best and average lap times, and best and average sector times.
Fast-forwards the session replay started with replay_session_live/2
by a given number of seconds.
Same as get_env/2 but returns an ok tuple or :error.
Gets a configuration value for F1Bot application.
Returns an ok-wrapped boolean indicating whether the current session is a race or another type of session (FP/Q). Returns an error if the session info is not available.
Returns the current lap number.
Fetches session archives from a given URL, silently replays them, and replaces the current session with the replayed session. Useful for testing and restoring data from the last session on server restart.
Similar to reload_session/2, but replays the session in live,
as if the session was currently in progress (equivalent to demo mode).
Useful for development and debugging.
Resets the session state and clears all caches
Emits all known events from the current session state to the event bus to (1) update the delayed events caches (which are used on the website) and (2) synchronize the state of all connected Phoenix clients. This includes events such as session information, driver list, and session summaries for all drivers.
This should rarely (if ever) be needed as relevant events are automatically emitted on changes, which should keep the states synchronized at all times.
See F1Bot.F1Session.EventGenerator.StateSync for more details.
Returns the best lap time, best sector times, and top speed in this session.
Returns the current session clock - time remaining in qualifying and FP sessions or time left on the 2h timer during races.
Returns a copy of the current F1Session session state for analysis.
light_copy controls whether "heavy" data, such as position and car telemetry data
are stripped from the copy to reduce its size.
Returns information about the session such as the session type (FP/Q/R) and name.
Returns the current session status (e.g. started, in progress, ended)
Stops the session replay started with replay_session_live/2.
Downloads all available session archives and caches them locally. You shouldn't need to call this function directly, as the archives are cached automatically when they are first accessed.
Returns a history of track status changes (safety cars, red flags, etc.)