This package has been deprecated

Author message:

All packages in the @keystone-alpha namespace are now available in the @keystonejs namespace, starting at version 5.0.0. To upgrade, update package.json to point to "@keystonejs/oembed-adapters": "^5.0.0" and update any require/import statements in your code.

@keystone-alpha/oembed-adapters

1.1.2 • Public • Published

OEmbed Adapters

The OEmbed field type (from @keystone-alpha/fields) can fetch oEmbed data from a number of providers such as Iframely.

This package contains adapters for different providers.

IframelyOEmbedAdapter

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:

  • iframe=1
  • omit_script=1

/@keystone-alpha/oembed-adapters/

    Package Sidebar

    Install

    npm i @keystone-alpha/oembed-adapters

    Weekly Downloads

    6

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    12.5 kB

    Total Files

    11

    Last publish

    Collaborators

    • emmatown
    • jedwatson
    • molomby