0.1.2 • Published 12 years ago

apa-client v0.1.2

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

#apa-client - a node.js Amazon product advertising API client

npm.io

##Install

npm install apa-client

##Features

  • All operations with Client#execute()
  • Switch the locale with Client#swithLocale()
  • Handle gracefully errors from the XMLParser, http request and specific APA API errors by always passing an Error has first argument in the callback.

##Usage

// Load dependency
var apa = require('apa-client');

// Create a client
var client = apa.createClient({
	"awsAccessKeyId" : "", // your aws access key id here
	"awsSecretKey" : "", // your secret key here
	"associateTag" : "" // your associate tag here
});

// Switch locale
client.switchLocale('fr');

// Execute 'ItemSearch' operation with few arguments
client.execute('ItemSearch',{
			    SearchIndex : 'All',
			    Keywords : 'TV Plasma',
			    ResponseGroup : 'OfferFull,Images,ItemAttributes,SalesRank,EditorialReview',
			    Availability : 'Available'
			},function(err,data){
				if(err)  return console.error(err);
				console.log(JSON.stringify(data));
			});

##Test Before running the tests create a file config-private.json containing your own credentials to create the client.

npm test

##Licence (The MIT License) Copyright 2011-2012 HipSnip Limited

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago