0.0.3 • Published 9 years ago
colorme v0.0.3
colome-js
ColorMeShop API client written in JavaScript for browser and node.js
Install
Using bower:
$ bower install colorme
Using npm:
$ npm install colorme
Usage
var Colorme = require('colorme');
var colorme = new Colorme({token: 'colorme-api-token'});
colorme.products.get().then(function(data) {
console.log(data.products);
console.log(data.meta);
});
colorme.products.get({id: 1}).then(function(data) {
console.log(data.product);
});
colorme.products.put({id: 1, product:{name: "UpdatedName"}}).then(function(data) {
console.log(data.product);
});
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request