Skip to content

Latest commit

 

History

History
129 lines (80 loc) · 5.06 KB

README.md

File metadata and controls

129 lines (80 loc) · 5.06 KB

apiholdit

License ReportCard

Table of contents

Introduction

APIholdit is a drop-in and easy to deploy microservice who exposes an HTTP API you can use to generate placeholder images with a desired text, automatically centered and scaled.

For example:

psh screenshot

User Documentation

The main entry point for the REST API is the following URL:

http://<host>:<port>/i

URL Parameters

This URL accept the following parameters:

Width

width of the placeholder image in pixels.

By default is 640 pixels.

Height

height of the placeholder image in pixels.

By default is 480 pixels.

Text

text defines the placeholder text that will appear autoscaled and centered on the placeholdwr image.

This text should be encoded to allow special characters.

By default is the string Placeholder.

Background color

bgcolor sets the background color to be used to render the placeholder image.

By default is the color called Silver from the FlatUIColors color palette. And its code is #bdc3c7.

Foreground color

fgcolor sets the foreground color, or the color being used to draw the text on the placeholder image.

By default is the color called Midnight Blue from the FlatUIColors color palette. And its code is #2c3e50.

Examples

Here are a few eamples using the previous defined API:

URL Placeholdwer
http://example.com/i?width=320&height=200 psh screenshot
http://example.com/i?width=320&height=200&text=placeholder-text psh screenshot
http://example.com/i?width=320&height=200&text=placeholder-text&bgcolor=c0392b&fgcolor=2980b9 psh screenshot

Developer Documentation

Deployment

You can also deploy APIHoldit on Heroku with this one click button:

Deploy

Continuous integration

Tests

  • Develop: CircleCI
  • Master: CircleCI

Coverage

  • Develop: Coverage Status
  • Master: Coverage Status

License

(The MIT License)

Copyright (c) 2017 apiholdit Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.