Skip to main content

Schedule

Importing

import { schedule } from "f1.ts"

Methods

.current

Get the F1 schedule for the current year.

Returns

Promise that resolves to a Schedule

Example

await schedule.current()

.remaining

Get the remaining events on the F1 schedule for the current year.

Returns

Promise that resolves to a Schedule

Example

await schedule.remaining()

.year

Get the schedule by a specific season, by year.

Requires

year (Number) - The year to fetch from.

Returns

Promise that resolves to a Schedule

Example

await schedule.year(2023)