Skip to content

Capture high quality website screenshots using Thumbnail Microservice API

License

Notifications You must be signed in to change notification settings

Zahidul-Islam/thumbnail-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thumbnail Microservice

Capture high quality website screenshots using Thumbnail Microservice API

screenshot

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=<YOUR_AWS_REGION>
AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
S3_BUCKET_NAME=<YOUR_S3_BUCKET_NAME>

Run npm run dev

Thumbnail Microservice API is running on www.localhost:8000

API documentation

Making an API request

The url format for making a REST api request to Thumbnail Microservice is:

http://<thumbnail-micorservice-api>/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.

About

Capture high quality website screenshots using Thumbnail Microservice API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published