Giter Club home page Giter Club logo

thumbnail-microservice's Introduction

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.

thumbnail-microservice's People

Contributors

chatbotschool avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.