ColorMeShop API client written in JavaScript for browser and node.js
$ npm install colorme
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);
});
See Colorme Unit Test for other apis.
- 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