affilinet-lookup
v0.4.2
Published
A simple wrapper around the affilinet search products api
Downloads
1
Readme
affilinet-lookup
Introduction
This module is a simple wrapper around the affilinet product search api.
Installation
npm install affilinet-lookup
Usage
affilinet-lookup -i <publisher id> -p <api password> -k <search keywords>
See affilinet-lookup --help for more information
Examples
Basic:
var affilinet = require('affilinet-lookup');
affilinet({keywords: 'test'})
.id('publisher id')
.key('publisher password')
.done(function (err, result) { ... })
Limit to certain shops:
var affilinet = require('affilinet-lookup');
affilinet({keywords: 'test'})
.id('publisher id')
.key('publisher password')
.shop('445') // T-mobile
.shop('112')
.done(function (err, result) { ... })
Limit number of results:
var affilinet = require('affilinet-lookup');
affilinet({keywords: 'test'})
.id('publisher id')
.key('publisher password')
.limit(5)
.done(function (err, result) { ... }) // result.length === 5
"findOne":
var affilinet = require('affilinet-lookup');
affilinet({keywords: 'test'})
.id('publisher id')
.key('publisher password')
.one()
.done(function (err, result) { ... }) // result === null || typeof result === 'object'
Change sorting order:
var affilinet = require('affilinet-lookup');
affilinet({keywords: 'test'})
.id('publisher id')
.key('publisher password')
.sort('-price') // Descending price
.done(function (err, result) { ... })
Dependencies
License
MIT