An open API service indexing awesome lists of open source software.

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

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"

#=> # # # # #