dev-master
9999999-devPHP library for the Fantasy Data API
The Requires
by Konrad Baron
api fantasy data
PHP library for the Fantasy Data API
PHP-FantasyData is a PHP library for the FantasyData API version 3. This library currently only contains wrappers for the Full NFL section, and the NBA Scores section of the API. Other sections are planned to be added in the future., (*1)
The API currently returns your data in two formats; JSON and XML., (*2)
This library requires the use of Composer., (*3)
composer require konradbaron/fantasydata:dev-master
You must first register an account to receive an API key from FantasyData Portal. There is a free trial option, which limits the amount of API calls to 1K per month., (*4)
NFL, (*5)
use KonradBaron\FantasyData\FantasyDataNFLPlayByPlay; $fd = new FantasyDataNFLPlayByPlay('YOUR_API_KEY'); echo $fd->playByPlay('json', '2016REG', 8, 'WAS');
NBA, (*6)
use KonradBaron\FantasyData\FantasyDataNBAScores; $fd = new FantasyDataNBAScores('YOUR_API_KEY'); echo $fd->schedules('json', '2016');
PHP library for the Fantasy Data API
api fantasy data