0.1.5 • Published 8 years ago

tesco v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

#Tesco NodeJS API

An simple precompiled ES6 Node wrapper to pull data from the Tesco API using Promises.

Get API key

Head over to Tesco Labs Dev Portal, sign up and subscribe to the API.

###Install

> npm install --save tesco

###Usage (ES5/2016) // ES2016 import TescoAPI from 'tesco'; const Tesco = new TescoAPI('apikey');

// Require
var TescoAPI = require('tesco');
var Tesco = new TescoAPI.default('apikey');

###TescoAPI.search(Query, Options, Callback);

You can pass two parameters: offset (default: 0) and limit (default: 10).

// ES2016
Tesco.search('Kellogs Cornflakes', { offset: 0, limit: 10 }, (err, response) => {
	if (err) console.log(err);
	console.log(response);
});

// ES5
Tesco.search('Kellogs Cornflakes', { offset: 0, limit: 10 }, function(err, response) {
	if (err) console.log(err);
	console.log(response);
});

Rate limiting

120 calls/minute up to a maximum of 3000 calls/week.

Is that it?

The API is quite small at the moment and is restricted to product searches. As the API begins to expand, I will update accordingly.

PR & Contributions

I am open to pull requests/contributions! Fire them away.

###Issues No known issues!

###License MIT

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago