tescojs

0.0.2 • Public • Published

TescoJS

A wrapper script for the tesco labs API. Need to be registered at https://secure.techfortesco.com/tescoapiweb to continue

Usage

Download via npm

npm install tescojs

Require Library

var tescojs = require('tescojs');

Login

 
var loginDetails = {
    "email": "test@test.com",
    "password": "password",
    "appKey": "key",
    "devKey": "key",
}
tescojs.login(loginDetails, function(err, sessionKey){
    //returns a session key for all future functions
});
 

Product Search

Search for a product by name or barcode. Will return page 1 by default

var options = {
    "product": '5000237112236' or "product": 'Ready Salted Crisps',
    "sessionKey": 'sessionKey',
    "pageNumber": '1'
}
tescojs.search(options, function(err, data){
    //returns an array of products
});

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i tescojs

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • bradders591