1.0.0 • Published 2 years ago

socialsplash v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

SocialSplash

Helper package to generate your images through SocialSplash API.

Installation

npm install socialsplash

Usage

import SocialSplash from 'socialsplash'

const splash = new SocialSplash({
  apiKey: '<your-api-key>',
  apiDomain: '<your-domain>',
  urlDomain: '<your-domain>',
})

const url = splash.url('<template uuid>', {
  title: 'My title',
  description: 'Hello world'
})

const url = splash.signedUrl('<template uuid>', {
  title: 'My title',
  description: 'Hello world'
})

const buffer = splash.image('<template uuid>', {
  title: 'My title',
  description: 'Hello world'
})

const url = splash.signedImage('<template uuid>', {
  title: 'My title',
  description: 'Hello world'
})

Examples

Generating an image with a public template

import { SocialSplash } from 'socialsplash'

const splash = new SocialSplash()
1.0.0

2 years ago