@arc-core-components/content-source_author-api-v4

0.1.0-beta.2 • Public • Published

Content Source: Author API v4 endpoint

This the Arc Core Component representing a content source that hooks into the Author API portion of the Arc Suite.

The most important part is the pattern, which defines the endpoint that PageBuilder Fusion uses to look up content.

This Core Component takes advantage of PageBuilder Fusion's ability to use CONTENT_BASE to define the credentials for an Author API, ensuring that no private secrets are exposed.

This content source should be used with the content-schema_author-v4 core component.

Pattern:

/author/v1/?slug=${slug}

Parameters:

This content source takes one parameter: a slug, typically the author's first and last name attached by a dash. Example: ben-bradlee.

Getting started

This Core Component must be used within a Fusion project.

  1. Add this schema as a dependency of the repo. npm install @arc-core-components/content-source_author-api-v4
  2. Create a file of your desired content source name within the /content/sources folder. For this content source, the suggested name is author-api-v4.js
  3. This is the name you should use when referencing this content source in any content config within a custom field.
  4. Paste the following into author-api-v4.js:
  import source from '@arc-core-components/content-source_author-api-v4'

  export default source

What does this content source return?

This will return a JSON object representing a single author from the Author API. It can be used to provide global content to an Author page, useful for rendering features that display information about the author.

Dependents (0)

Package Sidebar

Install

npm i @arc-core-components/content-source_author-api-v4

Weekly Downloads

35

Version

0.1.0-beta.2

License

ISC

Unpacked Size

4.51 kB

Total Files

5

Last publish

Collaborators

  • maddoxnelson
  • amyerz
  • danielkim1
  • design1online
  • juliebacon
  • yonm
  • dan-weaver
  • imaus10
  • wyattjohnston
  • npmwbcook
  • npmcojocaruv
  • robin.giannattasio
  • arcsubs
  • chenghsinw
  • styonsk