Skip to content

Spectrum

See also : Spectrum overview

Recommendation Endpoint configuration for Spectrum

When defining endpoints in PEACH Lab you need to add spectrum config section to your endpoint definition in order to have them displayed in Spectrum.

tfidf:
  url: /sirtv-related
  components:
    ...
  spectrum:
    organisation: sirtv
    title: Content-based recommendations by ID
    type: content
    item_type: episode
    media_type: video
    parameters:
      episode_id: id
Attribute Description
organisation Identifier of the organisation, should match to one used in Codex
title Display name of the endpoint
type Input type needed. content, user or text
item_type Type of returned items. article, program, episode, list, clip
media_type Media type of the returned items. audio, video or text
parameters Map of parameters. Here, id property of the item in Spectrum should be sent as the episode_id to the endpoint

What does Spectrum display ?

Spectrum Item

(* mandatory, + optional)

Attribute Description
title * Name or title of the item
description * Text content of an item (synopsis for an episode, text for an article...)
link * Absolute link to the content on the broadcaster's website
image * Thumbnail or preview
publishDate * Publication date of the item
itemType * Type of the item. article, program, episode, list, clip
mediaType * Media type of the item. audio, video or text
transcript + Transcript of the item's media or the item itself
duration + Duration of the media

When pushing to CODEX, using those field names will allow Spectrum to directly understand and display them. If field names are different, a mapping can be defined for a specific organisation on Spectrum side.

See also how to store Topics in CODEX, to have them displayed in Spectrum.