https://github.com/heiseonline/embetty-base
๐ API for heiseonline/embetty-server
https://github.com/heiseonline/embetty-base
api embetty javascript privacy
Last synced: 2 days ago
JSON representation
๐ API for heiseonline/embetty-server
- Host: GitHub
- URL: https://github.com/heiseonline/embetty-base
- Owner: heiseonline
- License: mit
- Created: 2017-11-20T12:29:51.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-08T18:28:24.000Z (over 2 years ago)
- Last Synced: 2025-04-03T22:23:50.879Z (24 days ago)
- Topics: api, embetty, javascript, privacy
- Language: JavaScript
- Homepage:
- Size: 1.03 MB
- Stars: 10
- Watchers: 10
- Forks: 5
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# embetty-base ยท [](https://travis-ci.org/heiseonline/embetty-base) [](https://david-dm.org/heiseonline/embetty-base) [](https://standardjs.com)
[Embetty](https://github.com/heiseonline/embetty) displays remote content like tweets or YouTube videos without compromising your privacy. `embetty-base` is the API used to retrieve the necessary data.
## Quick Start
### Install
```sh
$ npm install @heise/embetty-base
```or
```sh
$ yarn add @heise/embetty-base
```### Basic Usage
```js
const Embetty = require('@heise/embetty-base')const embetty = new Embetty()
const tweet = await embetty.loadTweet(someStatusId)
```### Using the cache
By default, remote service responses are stored in an LRU cache. The engine can be selected by defining the environment variable `EMBETTY_CACHE`. Example:
```sh
$ export EMBETTY_CACHE=redis://
```## Running tests
```sh
$ yarn test
```## Debug
You can set the `DEBUG` env to `embetty.*` to print debug info:
```sh
$ export DEBUG=embetty.*
```## License
embetty-base is [MIT licensed](./LICENSE).