JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
lib
test
.gitignore
.jshintrc
LICENSE
Readme.md
circle.yml
index.js
karma.conf.js
package.json

Readme.md

Chute JS SDK

Circle CI Code Climate Test Coverage bitHound Score

Chute API for the browser, Node and io.js.

Chute makes it possible for you to easily organize, store and serve photos and videos. This NPM package 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.

Note: This branch contains code for a new version that is not released publicly yet. See the v1 branch for source code of the current version.

Installation

The new version is not published yet. Install it by adding:

{
	"dependencies": {
	 "chute": "chute/chute-js"
	}
}

If you install it using npm install chute, you'll get the older version. (This will change once the new version is ready to be published.)

Getting Started

  1. Sign up for an account at Chute Developers Page
  2. Install this library npm install chute.
  3. Read the Tutorials [TODO]
  4. Study the JS SDK docs [TODO]

Usage

Fetch album's assets:

Asset.query({album: 'abcqsrlx'}).then(function(assets) {
	// `assets` is now a collection of album's assets
}, function(error) {
	// respond to error
});

More to be implemented...

Album

Albums allow you to manage sets of photos and videos.

[TODO]

Asset

Assets represent photos and videos stored on the Chute platform. Assets belong to albums.

Fetch album's assets:

// assets from album with shortcut=abcqsrlx
Asset.where({album: 'abcqsrlx'}).then(function(assets) {
	// ...
});

// asset from album abcqsrlx with shortcut=vjp3miwob
Asset.find({album: 'abcqsrlx', shortcut: 'vjp3miwob'}).then(function(asset){
	// ...
});

Tests

npm test

License

© 2015 Chute Corporation. Released under the terms of the MIT license.