https://github.com/toolstud-io/nowtricity
PHP Library for Nowtricity API
https://github.com/toolstud-io/nowtricity
co2-emissions nowtricity
Last synced: about 1 month ago
JSON representation
PHP Library for Nowtricity API
- Host: GitHub
- URL: https://github.com/toolstud-io/nowtricity
- Owner: toolstud-io
- License: mit
- Created: 2023-10-28T13:25:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-28T19:37:49.000Z (over 2 years ago)
- Last Synced: 2025-12-14T13:59:15.540Z (7 months ago)
- Topics: co2-emissions, nowtricity
- Language: PHP
- Homepage: https://www.nowtricity.com/emissions-api/
- Size: 433 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PHP Library for Nowtricity API
Github:


Packagist:
[](https://packagist.org/packages/toolstud-io/nowtricity)
[](https://packagist.org/packages/toolstud-io/nowtricity)

PHP Library for Nowtricity API - based on https://www.nowtricity.com/emissions-api/
## Installation
You can install the package via composer:
```bash
composer require toolstud-io/nowtricity
```
## Usage
``` php
$obj = new ToolstudIo\Nowtricity\Nowtricity($apiKey);
$countries = $obj->countries();
$current = $obj->current('belgium');
$last24 = $obj->last24('belgium');
$year = $obj->year('belgium', '2022');
```
## Testing
``` bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email author_email instead of using the issue tracker.
## Credits
- [Peter Forret](https://github.com/toolstud-io)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.