This package has been deprecated

Author message:

datakick shut down its operations on March 31 2020. This service can no longer be used. Instead you can switch to its successor node-brocade (https://www.npmjs.com/package/node-brocade)

datakick

1.2.0 • Public • Published

datakick

dependencies status travis npm version npm downloads coverage Status

Module for making requests to the Datakick API

Installation

npm

npm install datakick --save

unpkg

<script src="https://unpkg.com/datakick@1.2.0/dist/datakick.min.js"></script>

Usage

const datakick = require('datakick');
 
datakick.item('4335896051932').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

Features

Get an item by its GTIN

datakick.item('4335896051932').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

Update an existing item

datakick.update('000000000000', {
  name: 'Test',
  brand_name: 'Test Brand'
}).then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

Add a new item

datakick.add('000000000000', {
  name: 'Test',
  brand_name: 'Test Brand'
}).then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

List the first 100 products

datakick.list().then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

List all items of a specific page

datakick.page('20').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

Search for items

datakick.query('peanut butter').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

Upload an image

datakick.image('000000000000', 'image.jpg').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});

License

GPL-3.0

Readme

Keywords

none

Package Sidebar

Install

npm i datakick

Weekly Downloads

1

Version

1.2.0

License

GPL-3.0

Unpacked Size

57.8 kB

Total Files

13

Last publish

Collaborators

  • ent8r