willpublicmedia / npr-cds-expressionengine

An ExpressionEngine port of NPR's CDS plugin.
GNU General Public License v2.0
0 stars 0 forks source link

NPR Content Distribution System

An ExpressionEngine addon for publishing to and from NPR's Content Distribution System (CDS).

Ported from Open Public Media's NPR CDS wordpress plugin.

Description

The NPR Content Distribution System (CDS) Plugin provides push and pull functionality with the NPR CDS along with a user-friendly administrative interface.

NPR's CDS is a content API, which essentially provides a structured way for other computer applications to get NPR stories in a predictable, flexible and powerful way. The content that is available includes audio from most NPR programs dating back to 1995 as well as text, images and other web-only content from NPR and NPR member stations. This archive consists of over 250,000 stories that are grouped into more than 5,000 different aggregations.

This plugin also allows you to push your content to the NPR CDS, so that it can be republished by NPR or other NPR member stations.

Access to the NPR CDS requires a bearer token, provided by NPR. If you are an NPR member station or are working with an NPR member station and do not know your key, please ask NPR station relations for help.

Usage of this plugin is governed by NPR's Terms of Use, and more specifically their API Usage terms.

The WordPress plugin was originally developed as an Open Source plugin by NPR and is now supported by developers with NPR member stations working within the Open Public Media group. If you would like to suggest features or bug fixes, or better yet if you would like to contribute new features or bug fixes please visit our GitHub repository and post an issue or contribute a pull request.

Installation & Configuration

  1. Copy addon files to {system_dir}/user/addons/npr_cds/.
  2. Activate plugin from control panel Addons screen.
  3. From the CDS settings screen, configure the following:
    • CDS token as provided by NPR
    • document prefix as provided by NPR
    • org/service ID as provided by NPR
    • and your push and pull urls.
  4. Select "Theme uses featured image" if your page templates pull a hero image from the story's image field.
  5. Select a suitable file storage location for pulled images.
  6. Select channels that may be used by the CDS addon. See channel mapping rules below.

Mapped Channels

Only mapped channels will be processed for CDS content.

In order to be mapped, a channel must meet the following requirements:

Migrating from Story API

If the Story API addon is already installed, this addon will attempt to migrate existing settings and make a clean switch from the Story API to CDS.

  1. Upgrade to the latest version of the story api addon to prevent data loss.
  2. Follow installation instructions 1 and 2, above.
    • The installer will attempt to convert your Org ID to a Service ID if possible.
    • Channels mapped for the story api will be used in CDS.
    • CDS will use the same file storage location as CDS.
    • The story api extensions will be deactivated.
  3. Follow CDS configuration instructions as above.
  4. Remove the story api addon when convenient.

Usage

WIP

Frequently Asked Questions

Can anyone get an NPR CDS Token?

If you are an NPR member station or are working with an NPR member station and do not know your key, please ask NPR station relations for help.

Can anyone push content into the NPR CDS using this plugin?

Push requires an Organization ID in the NPR CDS, which is typically given out to only NPR stations and approved content providers. If that's you, you probably already have an Organization ID.

Where can I find NPR's documentation on the NPR CDS?

There is documentation in the NPR's Github site.

Resources