Chute Ruby SDK

Circle CI Gem Version Code Climate Test Coverage

Chute API SDK for Ruby

Chute makes it possible for you to easily organize, store and serve photos and videos. This Ruby gem provides you with a wrapper for the Chute API.

You can learn more about Chute at http://getchute.com and explore the API at http://docs.chute.apiary.io.

How to use

Install directly

gem install chute

or add to your Gemfile

gem 'chute'

Configuration

Create config/initializers/chute.rb and set your credentials (you can get them from apps.getchute.com.

Chute.configure do |config|
  config.app_id = YOUR_APP_ID
  config.app_secret = YOUR_APP_SECRET
  config.access_token = YOUR_ACCESS_TOKEN
end

Usage

The parameters in the response are accessed as standard fields inside a class. Assuming response is the basic object containing the complete response you can access the id of an element by

response.data.id # if data is a single object
response.data[0].id # if data is an array

Development

To build and install the gem locally on your system use:

rake install

you can afterwards include it inside your rails app

Tests

rspec

Responses are recorded for reuse by VCR. If you need to re-run some of them remove the specific file from spec/fixtures/

Test coverage is automatically calculated. To see it, open browser at /coverage/index.html.

License

Copyright (c) 2012-2015 Chute Corporation. Released under the terms of the MIT License.