Permalink
Browse files

Update a few things to note that results are now parsed with xml2js. Add

xml2js as dependency to package.json.
  • Loading branch information...
1 parent 10528e2 commit a485a0e0d124c9f68d34323e4371bddc0b67c521 @dmcquay committed Aug 19, 2010
Showing with 9 additions and 5 deletions.
  1. +4 −3 README
  2. +1 −1 examples/example-item-search.js
  3. +4 −1 package.json
View
7 README
@@ -30,9 +30,10 @@ Here's a quick example:
'ResponseGroup': 'ItemAttributes,Offers'
}, function(error, results) {
if (error) { sys.print('Error: ' + error + "\n") }
- sys.print("Results:\n" + results + "\n");
+ sys.print("Results:\n" + sys.inspect(results) + "\n");
});
+Results are returned as a JSON object (XML results parsed using xml2js -- thanks pierrel).
-The library is pretty slim. It doesn't even parse the XML results yet. It is also very
-new and may be unstable. That said, I'm using it without any problems.
+The library is pretty slim. It is also very new and may be unstable. That said, I'm using
+it without any problems.
View
2 examples/example-item-search.js
@@ -13,5 +13,5 @@ opHelper.execute('ItemSearch', {
'ResponseGroup': 'ItemAttributes,Offers'
}, function(error, results) {
if (error) { sys.print('Error: ' + error + "\n") }
- sys.print("Results:\n" + results + "\n");
+ sys.print("Results:\n" + sys.inspect(results) + "\n");
});
View
5 package.json
@@ -10,7 +10,10 @@
, "os" : [ "linux", "darwin", "freebsd" ]
, "directories" : { "lib" : "./lib/" }
, "main" : "./lib/apac"
-, "dependencies" : { "vows" : ">=0.5.0" }
+, "dependencies" :
+ { "vows" : ">=0.5.0"
+ , "xml2js" : "*"
+ }
, "engines" : { "node" : ">=0.1.97" }
, "licenses" :
[ { "type" : "MIT"

0 comments on commit a485a0e

Please sign in to comment.