nick-smit/openf1-api

An API client for openf1.org

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/nick-smit/openf1-api

1.0.2 2024-09-05 11:00 UTC

This package is auto-updated.

Last update: 2026-01-05 13:46:17 UTC


README

An API client for openf1.org using guzzlehttp/guzzle.

Installation

You can add this library as a dependency to your project using Composer:

composer require nick-smit/openf1-api

Usage example

$factory = new NickSmit\OpenF1Api\Factory\OpenF1ApiClientFactory();
$apiClient = $factory->create();

// Retrieve the drivers who participated in the latest session.
$drivers = $apiClient->drivers(sessionKey: NickSmit\OpenF1Api\Filter\IdFilter::latest());

foreach ($drivers as $driver) {
    echo $driver->fullName . "\n";
}

You will find more examples in the examples directory.

License

OpenF1 Api is made available under the MIT License (MIT). Please see the License File for more information.

Disclaimer

OpenF1 is an unofficial project and is not associated in any way with the Formula 1 companies. F1, FORMULA ONE, FORMULA 1, FIA FORMULA ONE WORLD CHAMPIONSHIP, GRAND PRIX and related marks are trade marks of Formula One Licensing B.V.