/retrotext

NodeJS API Bindings for the Retro Text Generator

Primary LanguageJavaScriptISC LicenseISC

Retro Text

NPM version NPM downloads Build status Dependencies

API Bindings for the Retro Text Generator on PhotoFunia. Licensed under ISC License.

Installation

Using NPM: npm install retrotext
Using Yarn: yarn add retrotext

Usage

First, create a new instance of the RetroText class:

const RetroText = require('retrotext')
const text = new RetroText()

Next, add details as appropriate:

const text = new RetroText()
  .setLine1('Top')
  .setLine2('Middle')
  .setLine(3, 'Bottom')
  .setBackgroundStyle('palmCircle')
  .setTextStyle('chrome')

Finally, fetch either a URL to the final image, or the image downloaded as a Buffer object:
Note: Both methods return Promises

let URL = await text.fetchURL()
let buffer = await text.fetchBuffer()

Credits