Wrapper for UK National Grid Carbon Intensity API
sebrave/laravel-carbon-intensity is a Laravel package for wrapper for uk national grid carbon intensity api.
It currently has 0 GitHub stars and 5 downloads on Packagist.
Install it with composer require sebrave/laravel-carbon-intensity.
Discover more Laravel packages by sebrave
or browse all Laravel packages to compare alternatives.
Last updated
This Laravel package helps you work with the UK National Grid's Carbon Intensity Forecasting API.
You can read more about the API at their website: https://carbonintensity.org.uk
You can install the package via composer:
composer require sebrave/laravel-carbon-intensity
$api = new \Sebrave\LaravelCarbonIntensity\LaravelCarbonIntensity();
// Get current forecast
$api->get();
// Get forecast for a Carbon date
$api->getByDate(now());
// Get forecast for first part of a UK postcode
$api->getByPostcode('EC1V');
// Get a breakdown by fuel type
$api->getBreakdown();
composer test
The MIT License (MIT). Please see License File for more information.