https://github.com/zahidul-islam/thumbnail-microservice
Capture high quality website screenshots using Thumbnail Microservice API
https://github.com/zahidul-islam/thumbnail-microservice
async-await aws-s3 phantomjs screenshot-generator screenshot-utility
Last synced: 8 months ago
JSON representation
Capture high quality website screenshots using Thumbnail Microservice API
- Host: GitHub
- URL: https://github.com/zahidul-islam/thumbnail-microservice
- Owner: Zahidul-Islam
- License: other
- Created: 2017-09-24T07:39:25.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-24T08:54:28.000Z (about 8 years ago)
- Last Synced: 2024-12-29T04:53:23.300Z (9 months ago)
- Topics: async-await, aws-s3, phantomjs, screenshot-generator, screenshot-utility
- Language: JavaScript
- Size: 571 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Thumbnail Microservice
Capture high quality website screenshots using Thumbnail Microservice API
[]()
### Getting Started
### Installation
To use **Thumbnail Microservice API** clone the GitHub repository.
```
git clone https://github.com/Zahidul-Islam/thumbnail-microservice.git
cd thumbnail-microservice.git
npm install
```### Update environment variables
Rename ```.env.template``` file to ```.env``` using ```mv .env.template .env```
Update properties in **.env** file
```
PORT=8000
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_BUCKET_NAME=
```Run ```npm run dev```
Thumbnail Microservice API is running on [www.localhost:8000](www.localhost:8000)
### API documentation
#### Making an API request
The url format for making a REST api request to Thumbnail Microservice is:
```
http:///api/v1/thumbnails/?REQUEST_OPTIONS
```Where:
```REQUEST_OPTIONS``` should be replaced by a query string that contains all of the options you want to set.
#### Request Options
Below is a table listing all of the available options to the API.
Combine these options as parameters in the query string for e.g. ```?url=google.com&size=window```
Option
Example Value
size
window/all
viewport
width x height (1024x768)
quality
75
renderDelay
0
timeout
0
The full HTTP url could be:
http://localhost:8000/api/v1/thumbnails/?url=google.com&size=window&viewport=600x800&quality=90&renderDelay=2000&timeout=4000
### License
Copyright (c) 2017, Zahidul Islam. (MIT License)
See LICENSE for more info.