https://github.com/deanpcmad/ecologi
Ruby library for interacting with the Ecologi API
https://github.com/deanpcmad/ecologi
ecologi ruby rubygem
Last synced: over 1 year ago
JSON representation
Ruby library for interacting with the Ecologi API
- Host: GitHub
- URL: https://github.com/deanpcmad/ecologi
- Owner: deanpcmad
- License: mit
- Created: 2022-02-24T22:49:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-24T22:54:21.000Z (over 4 years ago)
- Last Synced: 2025-02-03T14:37:12.486Z (over 1 year ago)
- Topics: ecologi, ruby, rubygem
- Language: Ruby
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ecologi
This is a Ruby library for interacting with the Ecologi API.
## Usage
To get started, install the gem as normal:
```ruby
gem "ecologi"
```
Then you'll need to grab an API key from your [Impact API page](https://ecologi.com/account/api).
Once you've got an API key, setup a client like so:
```ruby
@client = Ecologi::Client.new(api_key: ENV["API_KEY"])
```
You can then use the following methods.
### Purchasing Trees
To purchase trees for an account. Requires a number. The name parameter is optional.
```ruby
@client.trees.purchase number: 2, name: "Tree's for user"
#=> # # # # #