Componette

Componette

natocTo

natocTo / footballData

Nette integration of football-data.org's API.

download-cloud-line composer require natocto/football-data

NatocTo/FootballData

Nette basic integration of football-data.org's API.

Installation

The best way to install NatocTo/FootballData is using the Composer

$ composer require natocto/football-data

and you can enable the extension using your neon config

extensions:
	footballData: NatocTo\FootballData\DI\FootballDataExtension

if you want increase your rate limit from 50 requests per day to 50 requests per minute you can get your free token from football-data.org

footballData:
	authToken: 'YOUR-TOKEN'

example of usage

class FootballPresenter extends Nette\Application\UI\Presenter
{
	/**
	 * @inject
	 * @var \NatocTo\FootballData\FootballData
	 */
	public $footballData;

	public function renderDefault()
	{
		$euro2016 = $this->footballData->getSeason(424);

		$this->template->name = $euro2016->getName();

		$this->template->fixtures = $euro2016->getFixtures();
	}
}

Documentation

There is no documentation. Just look to source code if you are interested.

No release at this moment. Try to create first one.

bar-chart-fill

Statistics

download-cloud-fill
39
star-fill
0
bug-fill
0
flashlight-fill
7.8y
price-tag-2-line

Badges

guide-fill

Dependencies

Componette Componette felix@nette.org