danabrey / fleaflicker-api
PHP library for interacting with the Fleaflicker API
v0.3
2024-05-17 16:21 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- symfony/http-client: ^5.1|^6.0|^7.0
- symfony/property-access: ^5.1|^6.0|^7.0
- symfony/serializer: ^5.1|^6.0|^7.0
Requires (Dev)
- phpunit/phpunit: ^9
README
This is a PHP library for interacting with the Fleaflicker API.
Installation
composer require danabrey/fleaflicker-api
Usage
Create an instance of the client
$client = new DanAbrey\FleaflickerApi\FleaflickerApiClient(2020);
The league year is required.
Use the client methods to make requests to the API, e.g.:
$client->players()
$client->league('XXXXX')
where XXXXX is the league ID.
$client->rosters('XXXXX')
where XXXXX is the league ID.
All methods return either a single instance or an array of plain PHP objects that represent the data returned. e.g. FleaflickerLeaguePlayer
, FleaflickerLeagueProPlayer
, FleaflickerLeagueRoster[]
, etc.
Running tests
./vendor/bin/phpunit