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
Requires
- php: >=8.3
- guzzlehttp/guzzle: ^6.5|^7.4.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpunit/phpunit: ^11.3
- rector/rector: ^1.2
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.