Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heiseonline/embetty-base
๐ API for heiseonline/embetty-server
https://github.com/heiseonline/embetty-base
api embetty javascript privacy
Last synced: 3 months 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 (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-08T18:28:24.000Z (about 2 years ago)
- Last Synced: 2023-02-26T21:47:03.101Z (almost 2 years ago)
- Topics: api, embetty, javascript, privacy
- Language: JavaScript
- Homepage:
- Size: 1.03 MB
- Stars: 9
- Watchers: 7
- Forks: 5
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# embetty-base ยท [![Build Status](https://travis-ci.org/heiseonline/embetty-base.svg?branch=master)](https://travis-ci.org/heiseonline/embetty-base) [![Dependency Status](https://david-dm.org/heiseonline/embetty-base.svg)](https://david-dm.org/heiseonline/embetty-base) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](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).