{"_id":"amazon-lib","_rev":"11-fdd889bfebf0aaa3b79eccbb5de185c0","name":"amazon-lib","description":"AWS Library","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"amazon-lib","description":"AWS Library","version":"0.0.1","keywords":["Amazon","AWS","SQS","SNS"],"repository":{"type":"git","url":"git@github.com:doug-martin/amazon-lib.git"},"author":{"name":"Doug Martin"},"main":"index.js","dependencies":{"comb":">=0.0.3","xml2js":">=0.1.11"},"directories":{"lib":"lib"},"engines":{"node":">= 0.4.4"},"_npmJsonOpts":{"file":"/Users/eds/.npm/amazon-lib/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"amazon-lib@0.0.1","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"35b597ca0e802ed4b8a50a98cb4cc87952eea12a","tarball":"https://registry.npmjs.org/amazon-lib/-/amazon-lib-0.0.1.tgz","integrity":"sha512-d/L8ARJcEMTec61Z9y9HLZ4Z6NeYeGCZv96xx3JUawR6d2/XXshw6+JuXF/5HxNHTUYbNLnTiLp2GP0FGrP6xw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVr8ikSAhu5YREZ+2wvbQ9lhcTWgc+E1lNToUOuB2x4QIhAOWRdLsa7Mw1f4gtI2ih+Hag8fZ0l2f4qZLCXf8w0W8+"}]},"scripts":{},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"amazon-lib","description":"AWS Library","version":"0.0.2","keywords":["Amazon","AWS","SQS","SNS"],"repository":{"type":"git","url":"git@github.com:doug-martin/amazon-lib.git"},"author":{"name":"Doug Martin"},"main":"index.js","dependencies":{"comb":">=0.0.5","xml2js":">=0.1.11"},"directories":{"lib":"lib"},"engines":{"node":">= 0.4.4"},"_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"_id":"amazon-lib@0.0.2","devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"28cc38d13af84d5a20ac249fcb63bb894522db0e","tarball":"https://registry.npmjs.org/amazon-lib/-/amazon-lib-0.0.2.tgz","integrity":"sha512-TpoeWpTtkEdgwRZYSki8R6HDIVh+sFIwGlq8tmB60LH2rwjP9bs1CeIjNS4fbrhud0PPqMnAKpPL6J8Ivh6eig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsVIm4Mjw51IzlSUVdR1sHnTJ/8WxWmSnQhvSNIAow2gIhAKVV2P8imccIt5eO7mijIAruuExH8MaxcEDxtcY+Cd+A"}]},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0":{"name":"amazon-lib","description":"AWS Library","version":"0.1.0","keywords":["Amazon","AWS","SQS","SNS","Amazon Product API"],"repository":{"type":"git","url":"git@github.com:doug-martin/amazon-lib.git"},"author":{"name":"Doug Martin"},"main":"index.js","dependencies":{"xml2js":">=0.1.11","extended":"~0.0.3","declare.js":"~0.0.4","promise-extended":"~0.0.4","object-extended":"~0.0.3","is-extended":"~0.0.4","it":"~0.2.2","sandboxed-module":"~0.2.0"},"scripts":{"test":"it -r dot"},"directories":{"lib":"lib"},"engines":{"node":">= 0.4.4"},"devDependencies":{"grunt-it":"~0.3.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.3.0"},"readme":"[![Build Status](https://travis-ci.org/doug-martin/amazon-lib.png)](https://travis-ci.org/doug-martin/amazon-lib)\n\n# Amazon lib\n\n## Overview\n\nPlug-able AWS client with support for\n\n  * SQS(Simple Queue Service)\n  * SNS (Simple Notificaton Service)\nCan easily be extended and extensions are welcome.\n\n## Why this library?\n\nThis library leverages Promises to allow for flow control as well as full error catching, and propogation(Now you have to handle them :) ). Its extensible.\n\n## Installation\n\n    npm install amazon-lib\n\n## Usage\n\n### SQS\n\nAvailable operations, SEE API for options and description of params\n\n   * listQueues\n      * Lists all queues.\n   * deleteQueue\n       * After this has been called and the promise is called back this client should not be used for any queue specific operations, NOTE: this method requires a queue path.\n   * deleteMessage(receiptHandle)\n   * receiveMessages(/*Object*/options)\n       * see the SQS api for options, you can lowercase the first letter of each option.\n   * addPermission(/\\*String\\*/label, /\\*Array|Object\\*//\\*{accountId : <accountId>, actionName : <actionName>}\\*/actions)\n      * See the SQS API for action names.\n   * removePermission(label)\n   * sendMessage(messageBody)\n   * changeMessageVisibility(receiptHandle, visibilityTimeout)\n   * doAction(/*Object*/options)\n      * Performes the action specified by options.Action, and params required should also be included in the object. This method should be used for any missing API operations.\n\nWithout queue\n\n```js\n\nvar aws = require('amazon-ib'),\n      url = require('url'),\n\nvar sqsClient = new aws.SQSClient({\n     awsAccessKeyId: '<Your key>',\n     awsSecretAccessKey: '<Your Secret>'\n});\n\n//just list the queues\nsqsClient.listQueues().then(function(queues){\n     queues.forEach(function(q){\n             console.log(q);\n     });\n});\n\n\n//with a prefix\nsqsClient.listQueues(\"test-queue\").then(function(queues){\n     queues.forEach(function(q){\n             console.log(q);\n     });\n});\n\n//Find a queue by name and use it\nsqsClient.listQueues(\"test-queue\").then(function(queues){\n     var queuePath;\n     for (var i = 0, l = urls.length; i < l; i++) {\n          var urlObj = url.parse(urls[i]);\n          var pathName = urlObj.pathname;\n         if (pathName && pathName.match(/test\\-name$/)) {\n             queuePath = pathName;\n             break;\n         }\n     }\n     if (queuePath) {\n         sqsClient.path = queuePath;\n     }\n});\n\nsqsClient.receiveMessages({maxNumberOfMessages : 3, visibilityTimeout:(1000*60)*2}).then(function(messages){//do something ....}\n\n```\n### SNS\n\nAvaiable operations. See SNS API for description of parameters\n\n   * addPermission(label, actions)\n   * removePermission(label)\n   * createTopic(name)\n   * deleteTopic()\n   * getTopicAttributes()\n   * publish(options)\n   * subscribe(options)\n   * unSubscribe()\n\n```js\nvar snsClient = new aws.SNSClient({\n     awsAccessKeyId: '<Your key>',\n     awsSecretAccessKey: '<Your Secret>'\n     topicArn : '<Topic Arn>'\n});\n\nsnsClient.publish({\n                subject : \"HELLO\",\n                message : \"WORLD!\"\n});\n\n```\n\n### Product Advertising\n\nAvailable opertations. See Product Advertising API for description of parameters\n\n   * search(query)\n   * lookup(query)\n\n```js\nvar productClient = new aws.ProductAdvertising({\n      awsAccessKeyId: '<Your key>',\n      awsSecretAccessKey: '<Your Secret>',\n      associateTag: '<Your Associate Tag>'\n});\n\nproductClient.search({SearchIndex: \"Books\", Keyword: \"Harry Potter\"}).then(function(results){\n   //<Do something with the results>\n});\n\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 Doug Martin &lt;doug@dougamartin.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n##Meta\n\n* Code: `git clone git://github.com/doug-martin/amazon-lib.git`\n","readmeFilename":"Readme.md","_id":"amazon-lib@0.1.0","dist":{"shasum":"0e07a4fff8f08d07428a2f3b3b3f7410fce0c2bf","tarball":"https://registry.npmjs.org/amazon-lib/-/amazon-lib-0.1.0.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2jTqCRA9TVsSAnZWagAAf00QAICWC/d5xmbbE1uCMZbi\n6X7mj4hNTx+ZVVWdEkISgI4NJDQGhNKiSg1hJdkA36u25G9zW5ckeWo/IOpZ\nwUxavF3HkgLf0r75NWXyRMoR6Fo1ipz6Ordvnufq3DmeNcPMOT2Ue4pI+OeF\nF7vzCffjWodaPhei5XJguZLJRlsE3xk8vDzI4UBGHULX58zenmSnkKF2hLx0\nxAYW+QZfws4zDKuMtRP6/bHfeLUDdvCnR151I/mtzlNwt3szCbMap6hkzwMn\nvXHjaIruoEgNMEee+zBwhprOb/ZvnOz/1URAvjDd2bE7/RIP5w4QQab7bedp\nxFY+BACVfuFZsUjElzHBWJ3X7akRiiVVWbf2BZt/mX+jrxGZWQe8k+EBSeLz\n/HuGqNpmTvcl68CqOQpzoxdUR4mk8ln5DDnORPsy7k5iVNEjKQfzExgNyHU6\nnaDhhxfsO8XhUmKG+N603i1xLlSDIDYA4vLi9hndNW4Zblny2/r4Vj9SG3BN\nqVaQnVIwWxd4zoU4jgIzcP5itjgfWwA7cXSU2/m4OenBPS7ocPhIz9PNmCFb\nctA+dCA/62hdcc7yQUHwbe0/9jwuaptNj2L6QLcBZRtTeb5FwC5IHTXQ1/jz\nsZIB1zf6ONUhPvRzk1JLpXTC1SHRArd6riZJwjvFX4UIfQUOaSlESr1d7Pb8\n8wiA\r\n=8tsQ\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-RdwOhxqzjCUUlN0LyJbzlUSDziS3Mq4/goDuK910Et6ldgcqb26vzl3RcWE9YwK+XOAi/LmBkxxPJ84t3o3IYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8ek384sASXZdDzNOQADhd5YW6FM5QbOOV/7bghLZynAIhAPu775A4cibetGjGY3PjSV1r31cSYOtJZYNQLshjGYww"}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"time":{"modified":"2022-06-13T02:43:37.983Z","created":"2011-10-17T14:51:11.867Z","0.0.1":"2011-10-17T14:51:12.961Z","0.0.2":"2011-11-18T07:49:10.585Z","0.1.0":"2013-03-26T18:27:59.200Z"},"author":{"name":"Doug Martin"},"repository":{"type":"git","url":"git@github.com:doug-martin/amazon-lib.git"}}