https://github.com/astrotomic/ecologi-sdk
https://github.com/astrotomic/ecologi-sdk
carbon-offsetting ecologi sdk sdk-php trees treeware
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/astrotomic/ecologi-sdk
- Owner: Astrotomic
- License: mit
- Created: 2022-10-06T10:58:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T01:21:01.000Z (8 months ago)
- Last Synced: 2024-10-29T21:06:01.135Z (8 months ago)
- Topics: carbon-offsetting, ecologi, sdk, sdk-php, trees, treeware
- Language: PHP
- Homepage: https://docs.ecologi.com/docs/public-api-docs
- Size: 45.9 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Ecologi SDK
[](https://packagist.org/packages/astrotomic/ecologi-sdk)
[](https://github.com/Astrotomic/ecologi-sdk/blob/master/LICENSE)
[](https://forest.astrotomic.info)
[](https://larabelles.com)[](https://packagist.org/packages/astrotomic/ecologi-sdk)
[](https://packagist.org/packages/astrotomic/ecologi-sdk)## Installation
```bash
composer require astrotomic/ecologi-sdk
```## Usage
```php
use Astrotomic\Ecologi\Ecologi;
use Astrotomic\Ecologi\Enums\CarbonUnit;$ecologi = new Ecologi($token);
// Reporting API
$ecologi->reporting()->getTrees('astrotomic');
$ecologi->reporting()->getCarbonOffset('astrotomic');
$ecologi->reporting()->getImpact('astrotomic');// Purchasing API
$ecologi->purchasing(test: false)->buyTrees(10, name: 'Gummibeer', idempotency: '1234567890');
$ecologi->purchasing(test: false)->buyCarbonOffset(500, unit: CarbonUnit::KG, idempotency: '1234567890');
```## Contributing
Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).
### Security
If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.
## Credits
- [Tom Witkowski](https://github.com/Gummibeer)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## Treeware
You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.
You can buy trees at [ecologi.com/astrotomic](https://forest.astrotomic.info)
Read more about Treeware at [treeware.earth](https://treeware.earth)