{"id":23003715,"url":"https://github.com/stechstudio/snapthis","last_synced_at":"2025-04-02T14:25:00.552Z","repository":{"id":57059335,"uuid":"317676505","full_name":"stechstudio/snapthis","owner":"stechstudio","description":"Laravel SDK for SnapThis snapshot service","archived":false,"fork":false,"pushed_at":"2021-03-18T12:17:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-08T15:02:57.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stechstudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-01T21:48:57.000Z","updated_at":"2021-03-18T12:17:39.000Z","dependencies_parsed_at":"2022-08-24T14:53:27.475Z","dependency_job_id":null,"html_url":"https://github.com/stechstudio/snapthis","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Fsnapthis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Fsnapthis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Fsnapthis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stechstudio%2Fsnapthis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stechstudio","download_url":"https://codeload.github.com/stechstudio/snapthis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246829975,"owners_count":20840730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T07:15:07.548Z","updated_at":"2025-04-02T14:25:00.535Z","avatar_url":"https://github.com/stechstudio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel SDK for SnapThis snapshot service\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/stechstudio/snapthis.svg?style=flat-square)](https://packagist.org/packages/stechstudio/snapthis)\n\nSnapThis is a screenshot service that will convert an URL or HTML payload into a PNG image or PDF file. \n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require stechstudio/snapthis\n```\n\nStore your API key in the .env file:\n\n```bash\nSNAPTHIS_API_KEY=[your api key]\n```\n\n## Quickstart\n\nTake a snapshot by using the `snapshot` or `pdf` methods. Return this result from a controller method to redirect to the snapshot:\n\n```php\nuse SnapThis;\n\n// Will take a PNG image snapshot and redirect the user:\nreturn SnapThis::snapshot('https://laravel.com');\n```\n\nOr add the `download` method to force the snapshot to download for your user.\n\n```php\nreturn SnapThis::pdf('https://laravel.com')-\u003edownload();\n```\n\nTo get the raw binary contents use the `contents` method:\n\n```php\n$contents = SnapThis::pdf('https://laravel.com')-\u003econtents();\n```\n\nYou can pass in an HTML string instead of a URL:\n\n```php\nSnapThis::pdf(\"\u003cstrong\u003eHello there\u003c/strong\u003e\");\n```\n\nYou can also pass in a blade view, then simply chain the `snapshot` or `pdf` methods.\n\n```php\n$users = User::all();\n\nreturn SnapThis::view('reports.users', ['users' =\u003e $users])-\u003epdf();\n```\n\n## Options\n\nThere are quite a few options for customizing the snapshot. Documentation coming!\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Fsnapthis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstechstudio%2Fsnapthis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstechstudio%2Fsnapthis/lists"}