Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 932 Bytes

README.md

File metadata and controls

33 lines (28 loc) · 932 Bytes

colome-js

ColorMeShop API client written in JavaScript for browser and node.js

Install

$ 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);
});

See Colorme Unit Test for other apis.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request