# @keystone-alpha/oembed-adapters

> Adapters for fetching oEmbed data for the OEmbed field type

Latest version **1.1.2** (published 2019-07-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @keystone-alpha/oembed-adapters
pnpm add @keystone-alpha/oembed-adapters
yarn add @keystone-alpha/oembed-adapters
bun add @keystone-alpha/oembed-adapters
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-07-19 |
| First published | 2019-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 68 |
| Author | The Keystone Development Team |
| Maintainers | dominikwilkowski, jedwatson, jesstelford, mitchellhamilton, molomby, nathansimpson95, timl |

## Links

- npm: https://www.npmjs.com/package/@keystone-alpha/oembed-adapters
- Repository: https://github.com/keystonejs/keystone-5
- Homepage: https://github.com/keystonejs/keystone-5#readme
- Issues: https://github.com/keystonejs/keystone-5/issues
- npm.io page: https://npm.io/package/@keystone-alpha/oembed-adapters

## Dependencies (5)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.3.0
- [@emotion/core](https://npm.io/package/@emotion/core.md) ^10.0.14
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.3
- [@iframely/embed.js](https://npm.io/package/@iframely/embed.js.md) ^1.1.1
- [@keystone-alpha/build-field-types](https://npm.io/package/@keystone-alpha/build-field-types.md) ^1.0.4

## Recent versions

- 1.1.2 (latest) — 2019-07-19
- 1.1.1 — 2019-07-10
- 1.1.0 — 2019-06-25
- 1.0.0 — 2019-06-14

## README

<!--[meta]
section: packages
title: OEmbed Adapters
[meta]-->

# OEmbed Adapters

The `OEmbed` field type (from `@keystone-alpha/fields`) can fetch oEmbed data
from a number of providers such as [Iframely](https://iframely.com).

This package contains adapters for different providers.

## `IframelyOEmbedAdapter`

```javascript
const { Keystone } = require('@keystone-alpha/keystone');
const { OEmbed } = require('@keystone-alpha/fields');
const { IframelyOEmbedAdapter } = require('@keystone-alpha/oembed-adapters');

const keystone = new Keystone(/* ... */);

const iframelyAdapter = new IframelyOEmbedAdapter({
  apiKey: '...', // Get one from https://iframely.com
});

keystone.createList('User', {
  fields: {
    portfolio: {
      type: OEmbed,
      adapter: iframelyAdapter,
    },
  },
});
```

NOTE: The request to Iframely will include the following [parameters](https://iframely.com/docs/parameters):

- `iframe=1`
- `omit_script=1`

---
_Source: https://npm.io/package/@keystone-alpha/oembed-adapters · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
