yaroslavche / sportradar-php-client
SportRadar PHP client
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=8.1
- symfony/cache: ^6 | ^7
- symfony/http-client: ^6 | ^7
Requires (Dev)
- infection/infection: ^0.27
- phpcompatibility/php-compatibility: ^9.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^10
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-12-21 14:22:30 UTC
README
Sportradar’s APIs are B2B (Business-to-Business) and are not intended to be called directly from a client application. The expectation is that you pull from our APIs, store the data, and then serve it directly to your customers. Link
Dependencies
php >=8.1
symfony/http-client ^6.3
symfony/cache ^6.3
API Client
[ ] Formula 1 V1 [X] Formula 1 V2
Example
use SR\ApiClientFactory; use SR\Exception\ApiClientExceptionInterface; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Contracts\HttpClient\ResponseInterface; $apiClientFactory = new ApiClientFactory(apiKey: 'your-api-key', cache: new FilesystemAdapter()); try { $formula1V2Client = $apiClientFactory->createFormula1Client(); /** @var ResponseInterface $response */ $response = $formula1V2Client->competitorMergeMappings(); $response = $formula1V2Client->competitorProfile(competitorId: 'sr:competitor:178318'); $response = $formula1V2Client->deletedStages(stageId: 'sr:stage:1031201'); $response = $formula1V2Client->seasons(); $response = $formula1V2Client->stageProbabilities(stageId: 'sr:stage:1031201'); $response = $formula1V2Client->stageSchedule(stageId: 'sr:stage:1031201'); $response = $formula1V2Client->stageSummary(stageId: 'sr:stage:1031201'); } catch (ApiClientExceptionInterface $exception) { }