0.4.2 • Published 10 years ago

affilinet-lookup v0.4.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

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

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.2.1

10 years ago