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
    group: Group Name
    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
group Group name and identifier for grouping endpoints
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. channel, program, article, 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
channel + Id of related channel in codex or:
{ id: 'channel_id', title: 'channel_title', link: 'url_to_channel' }
program + Id of related program in codex or:
{ id: 'program_id', title: 'program_title', link: 'url_to_program' }
categories + String of one or multiple editorial categories like sport, local
topics + See how to store Topics in CODEX

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.