Embetty displays remote content like tweets or YouTube videos without compromising your privacy. embetty-base
is the API used to retrieve the necessary data.
$ npm install @heise/embetty-base
or
$ yarn add @heise/embetty-base
const Embetty = require('@heise/embetty-base')
const embetty = new Embetty()
const tweet = await embetty.loadTweet(someStatusId)
By default, remote service responses are stored in an LRU cache. The engine can be selected by defining the environment variable EMBETTY_CACHE
. Example:
$ export EMBETTY_CACHE=redis://
$ yarn test
You can set the DEBUG
env to embetty.*
to print debug info:
$ export DEBUG=embetty.*
embetty-base is MIT licensed.