{"_id":"3scale-lambda","_rev":"6-c4f6855f9d78d13723aa216f90aac62b","name":"3scale-lambda","description":"Generate an AWS Lambda function to authorize API calls using 3scale","dist-tags":{"latest":"1.0.3"},"versions":{"0.0.1":{"name":"3scale-lambda","version":"0.0.1","description":"Generate an AWS Lambda function to authorize API calls using 3scale","main":"index.js","author":{"name":"Victor Delgado","email":"victor@3scale.net"},"license":"MIT","dependencies":{"archiver":"^0.14.4","split":"^1.0.0","through":"^2.3.8"},"gitHead":"253ad0d9bc9df5926095a124b35b37b060345aef","_id":"3scale-lambda@0.0.1","scripts":{},"_shasum":"1e3d685885f5a9176fb14b32e026b810352a4fa4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"victordg","email":"vdel26@gmail.com"},"maintainers":[{"name":"victordg","email":"vdel26@gmail.com"}],"dist":{"shasum":"1e3d685885f5a9176fb14b32e026b810352a4fa4","tarball":"https://registry.npmjs.org/3scale-lambda/-/3scale-lambda-0.0.1.tgz","integrity":"sha512-ywBc/A/Gqj79I+CcpPlEbBpNL3wD3EV2+O6g8dizIlujLVorNclhzMRPw6SCPC1Jt92N+j296AB/ZYVz5wD7zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUUx1IyUE3p+nV311INEL7vy+pL5CqDSn059Vg8kEh6gIgMkioIYBTuPyYwl7h1aP04T44VoFWrObZCrxH/AM91SQ="}]}},"1.0.0":{"name":"3scale-lambda","version":"1.0.0","description":"Generate an AWS Lambda function to authorize API calls using 3scale","main":"index.js","author":{"name":"Victor Delgado","email":"victor@3scale.net"},"license":"MIT","dependencies":{"archiver":"^0.14.4","split":"^1.0.0","through":"^2.3.8"},"gitHead":"649a59e638bb72ec318333e6ae3801aa8ceb378e","_id":"3scale-lambda@1.0.0","scripts":{},"_shasum":"362196a7de43ac2e1b475a708751bbf870b0f31a","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"victordg","email":"vdel26@gmail.com"},"maintainers":[{"name":"victordg","email":"vdel26@gmail.com"}],"dist":{"shasum":"362196a7de43ac2e1b475a708751bbf870b0f31a","tarball":"https://registry.npmjs.org/3scale-lambda/-/3scale-lambda-1.0.0.tgz","integrity":"sha512-yJDJ7M+ZcRZ0HWezGipX6NSUWETRz8v1z+EJevOakr64rJ45Kp63OnFmGY39+NUKrc2RcUSB2Uxyu2ftSIV18g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAgZ04ru1eYg1T343fB/cKhbzwm1LHpcllbCTFfVuTCMAiAda49B7s9z5Qd96A9PzAKBlNSCPrYfxSVS7/clqlu2gg=="}]}},"1.0.2":{"name":"3scale-lambda","version":"1.0.2","description":"Generate an AWS Lambda function to authorize API calls using 3scale","main":"index.js","author":{"name":"Victor Delgado","email":"victor@3scale.net"},"license":"MIT","dependencies":{"archiver":"^0.14.4","split":"^1.0.0","through":"^2.3.8"},"gitHead":"5f83f74232b98f59cc7fc6718b88c09c59817a4b","_id":"3scale-lambda@1.0.2","scripts":{},"_shasum":"5445d1cb01ec03adb2b8b1a327b3bc920407b348","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"victordg","email":"vdel26@gmail.com"},"maintainers":[{"name":"victordg","email":"vdel26@gmail.com"}],"dist":{"shasum":"5445d1cb01ec03adb2b8b1a327b3bc920407b348","tarball":"https://registry.npmjs.org/3scale-lambda/-/3scale-lambda-1.0.2.tgz","integrity":"sha512-aGyf0Lxu+oKxqDDxCLb+eG/xBtIW0D3mw/IhCmh70/zmrqoN0LHxC3aZs1M7v6kEm01YPga1LxxbXWjzjS9jWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCB4ZP+ZpN07G75MoypMnIh0lYMLKTfSfvXg3ksR6ORSwIgPB0/mKaGFMludT87V7VuP/x8f/fG2i2O2ucXAlS3kSo="}]}},"1.0.3":{"name":"3scale-lambda","version":"1.0.3","description":"Generate an AWS Lambda function to authorize API calls using 3scale","main":"index.js","author":{"name":"Victor Delgado","email":"victor@3scale.net"},"license":"MIT","dependencies":{"archiver":"^0.14.4","split":"^1.0.0","through":"^2.3.8"},"gitHead":"c00bb89971a8c8069f4e0334e5eab01dfd306d00","_id":"3scale-lambda@1.0.3","scripts":{},"_shasum":"77f5e733420e1949558597bb7cfcaf6fe1ea4810","_from":".","_npmVersion":"3.3.5","_nodeVersion":"4.0.0","_npmUser":{"name":"victordg","email":"vdel26@gmail.com"},"maintainers":[{"name":"victordg","email":"vdel26@gmail.com"}],"dist":{"shasum":"77f5e733420e1949558597bb7cfcaf6fe1ea4810","tarball":"https://registry.npmjs.org/3scale-lambda/-/3scale-lambda-1.0.3.tgz","integrity":"sha512-DUQsoztVsv8T9Vd6qNFRcdQEP+F1tDNZZQwm4lT6dj1pEZ5ZFh2vVfNGQr5TuZ6QLmPWJVrdr0ivChKLBjkJ7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFbWT5AYa1/hChkwhfRMCI19IE3b70J03OJkdYNAo47yAiEAohkTM0PtJm/48yHq2Twe9gwtcbOmp6cA6Rv3MZxLEDc="}]}}},"readme":"# 3scale Lambda generator\n\nThis module generates a Lambda function to integrate the AWS API Gateway with 3scale.\nAuthentication will be required as a `user_key` query parameter. \n\n## Prerequisites\n\nCreate the following [Mapping Template](http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) in your AWS API Gateway endpoint:\n\n```json\n{\n  \"user_key\": \"$input.params('user_key')\",\n  \"resourcePath\": \"$context.resourcePath\",\n  \"httpMethod\": \"$context.httpMethod\",\n  \"body\": \"$input.json('$')\"\n}\n```\n\nThe `Content-Type` of the mapping template should be `application/json`.\n\n## Method names\n\nFor each API endpoint you should create the corresponding method in 3scale. That way you will be able to keep track of the aggregate usage of your API as well as the breakdown per endpoint.\n\nIt is important that you create the method names in 3scale following this pattern:\n\n- Endpoint HTTP method: GET\n- Endpoint path: /api/words\n- **3scale method name**: api_words_GET\n\n## Using it programatically\n\n```js\nvar generator = require('3scale-lambda');\nvar params = {\n  providerKey: '3SCALE_PROVIDER_KEY',\n  serviceId: '3SCALE_SERVICE_ID'\n};\ngenerator(params, '/output/path/');\n```\n\nThis will create a zip file at `/output/path/3scale-lambda-auth.zip`. That zip is the bundle containing the Lambda function and all its dependencies, ready to be uploaded to AWS.\n","maintainers":[{"name":"victordg","email":"vdel26@gmail.com"}],"time":{"modified":"2022-06-12T14:07:29.724Z","created":"2015-08-13T15:38:49.697Z","0.0.1":"2015-08-13T15:38:49.697Z","1.0.0":"2015-08-30T20:14:06.677Z","1.0.2":"2015-09-16T17:35:56.524Z","1.0.3":"2015-10-12T20:51:17.192Z"},"author":{"name":"Victor Delgado","email":"victor@3scale.net"},"license":"MIT","readmeFilename":"README.md"}