An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Thumbnail Microservice

Capture high quality website screenshots using Thumbnail Microservice API

[![screenshot](https://raw.githubusercontent.com/zahidul-islam/thumbnail-microservice/master/images/amazon.png)]()

### 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.