Download the PHP package nkl-kst/the-sports-db without Composer
On this page you can find all versions of the php package nkl-kst/the-sports-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nkl-kst/the-sports-db
More information about nkl-kst/the-sports-db
Files in nkl-kst/the-sports-db
Package the-sports-db
Short Description PHP library to get sports data from TheSportsDB (https://www.thesportsdb.com)
License MIT
Homepage https://www.github.com/nkl-kst/the-sports-db
Informations about the package the-sports-db
TheSportsDB PHP library
An easy-to-use PHP library to get data from https://www.thesportsdb.com.
Features
- Get data for lists, livescores, lookups, schedules, searches or video highlights
- Get results in serialized classes
- Use your own API key
- Throttle long-running scripts
- Use PSR-4 autoloading
- Supports PHP 7.4+
This library uses Semantic Versioning.
Installation
Install this PHP library with Composer.
Usage
Get data
Get sports data from TheSportsDB.
See integration tests for examples of all documented API calls.
Use your API key
Use your own Patreon API key.
Throttle requests
You are advised to do no more than 100 requests per minute to TheSportsDB API (the hard limit is two requests per second). If you have long-running scripts to gather many data, please consider to use the built-in rate limiter.
As this library uses the Symfony Rate Limiter Component, it's possible to use a custom rate limit mechanism. Please consult the Symfony documentation for more information.
Known issues
- Livescores for v1 are not supported.
- If you are getting an exception like
JSON property "foo" in class "Bar" must not be NULL
, then there is an entity attribute which should be nullable. Please open a new issue in this case.
Feedback
If you have any problems or questions, feel free to open an issue or a pull request.
Developer notes
Run tests and code checks.
License: MIT
See LICENSE.
All versions of the-sports-db with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.2
netresearch/jsonmapper Version ^4.0
symfony/dependency-injection Version ^5.1 || ^6.0
symfony/rate-limiter Version ^5.2 || ^6.0