{"_id":"@apilayer/screenshotlayer","_rev":"1-b171001ca3f4874b4f705c70abf77ae0","name":"@apilayer/screenshotlayer","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.6":{"name":"@apilayer/screenshotlayer","version":"0.1.6","author":{"name":"Samuel Oloruntoba","email":"github@kayandra.co","url":"https://kayandra.co"},"license":"MIT","gitHead":"e0a9510ba4e021cc2692311d4869e451bef33799","publishConfig":{"access":"public"},"description":"Screenshotlayer: Capture highly customizable snapshots of any website","_id":"@apilayer/screenshotlayer@0.1.6","_nodeVersion":"10.16.3","_npmVersion":"lerna/3.16.4/node@v10.16.3+x64 (linux)","dist":{"integrity":"sha512-e88N9cyjzkN/ICwgmz5LIHJAcvAYo3xx0LNiKpwYyV2DaBbb0NsIkdGUs3baiSGIjXTl9YCONPCLMerR4Sx/DA==","shasum":"56a5518a0248bc826c7509c1e1a3f9f1bb158049","tarball":"https://registry.npmjs.org/@apilayer/screenshotlayer/-/screenshotlayer-0.1.6.tgz","fileCount":5,"unpackedSize":6324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkzKjCRA9TVsSAnZWagAAwtYP/3dhD5ZpRb/FSw0L7wRs\ndW/BTco5NJDw8sHTFhsTVDKHo1bhjXy0Y514kIJRnc7Y5CAlmbSkgWgumiyL\n7iF1XnfqHNMAxzM1YFccdsi1MXuKXZuJQHsLObnocmXYcW9DeWbP321IrMIK\nGFmCSh7TqxduVpaV3Ia8niwxC3PcpiQS7FQr1nWGBudcQ3ahYurQ4v2J3g+B\ngqamEpptqVvfJkCzA36AW3oxRdnEFdHzp5ocb+9GIleNNnwVRNYlPyxCvJ/b\nbQuKCLIbL1wS1jEcbb9h25nsd9L6eo/THdSokwfLNWZ6b6XqFNS5zEOsly6U\nmXuOO90Lg7kYMoxCg8xf6d/ESUnGBl6KGY8bxPEFY6Y7kgDjFYuVNOK/f0Jy\nCtJqv2m3Kvl/mTaU5kEDZBSRWiwrQ9K9gRUQUEYm1hnpvdOiCFRXQ9Dc+MFK\nqFvfZYqASy8cOjvL7wWrBSjyna902PxLq1bPX+b4CmJOtZW2ShhI2HIZ9A8C\nzOLZAC0OMC6UsuoUMoMbiaFdvl7goJ01H0pOnFlbTlRCspS9thXP/tQX1Keo\nHU5dSRFAvXOGQWZBDy1SMHdu6f0eXdyxQokbb9xJQKiVsdtJ7AP5QiU9bsEq\n4oUPP1qgq9MRW9p/OsiWQqAQEemw3u3b753Wxwop2an+XACPEy+RBfJ3UTln\n9xNx\r\n=pldZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrLiCKmMT0mujLpjEFmHKTRPdWDbWv/b89p5+uWiHJ2AiAsTFD4n+H41l/kO4PaAtS9N4l69jmmkGqDpNB4RiIg6g=="}]},"maintainers":[{"name":"kayandra","email":"tag@kayandra.co"},{"name":"apilayer-p","email":"support@apilayer.com"}],"_npmUser":{"name":"kayandra","email":"tag@kayandra.co"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/screenshotlayer_0.1.6_1569927842824_0.22790811013586443"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-01T11:04:02.537Z","0.1.6":"2019-10-01T11:04:02.965Z","modified":"2022-04-04T14:37:51.013Z"},"maintainers":[{"name":"kayandra","email":"tag@kayandra.co"},{"name":"apilayer-p","email":"support@apilayer.com"}],"description":"Screenshotlayer: Capture highly customizable snapshots of any website","author":{"name":"Samuel Oloruntoba","email":"github@kayandra.co","url":"https://kayandra.co"},"license":"MIT","readme":"# screenshotlayer-js\n\nScreenshotlayer: Capture highly customizable snapshots of any website\n\n## Installation\n\nUsing npm\n\n```\nnpm install --save @apilayer/screenshotlayer\n```\n\nor yarn\n\n```\nyarn add @apilayer/screenshotlayer\n```\n\n## Getting Started\n\nHead over to [Screenshotlayer](https://screenshotlayer.com/) and\ncreate an account. Copy access key from dashboard.\n\nYou can set a secret key from the dashboard or just use an empty string.\n\n```javascript\nimport screenshotlayer from '@apilayer/screenshotlayer'\n\nconst useHTTPs = false\nconst layer = new screenshotlayer(\"<your-access-key>\", \"<your-secret-key>\", useHTTPs)\n```\n\n## `capture`\n\n`capture` creates a valid screenshot URL\n\n**Signature:**\n\n```typescript\ncapture(site: string, config: Config = null): string\n```\n\n**Example:**\n\n```javascript\nconst response = layer.capture(\"https://apilayer.com\")\n\nconsole.log(\"response:\", response)\n```\n\n**Response:**\n\n```javascript\n\"http://api.screenshotlayer.com/api/capture\n  ?access_key=<your-access-key>\n  &url=https://apilayer.com\n  &viewport=1440x900\n  &format=PNG\"\n```\n\nAlternatively, you can specify a `Config` object as\nthe second parameter. Supported properties include:\n\n| Parameter     | Description                                                 |\n| :-----------: | :------------------------------------------------------------------------- |\n| `fullPage`    | set to `true` if you want to capture the full height of the target website |\n| `width`       | specify your preferred thumbnail width in pixels                           |\n| `vHeight`     | specify your preferred viewport height dimensions in pixels                |\n| `vWidth`      | specify your preferred viewport width dimensions in pixels                 |\n| `format`      | set your preferred image output format (PNG | GIF | JPG)                   |\n| `injectCSS`   | attach a URL containing a custom CSS stylesheet                            |\n| `delay`       | specify a delay before screenshot is captured (in seconds)                 |\n| `tTL`         | define the time (in seconds) your snapshot should be cached                |\n| `force`       | set to `true` if you want to force the API to capture a fresh screenshot   |\n| `placeholder` | attach a URL containing a custom placeholder image or set to \"1\"           |\n| `userAgent`   | specify a custom User-Agent HTTP header to send with your request          |\n| `acceptLang`  | specify a custom Accept-Language HTTP header to send with your request     |\n| `export`      | export snapshot via custom ftp path or using your AWS S3 user details      |\n\n## License\n\n[MIT](/LICENSE)\n","readmeFilename":"README.md"}