Data Source Provider (DSP) for Roku-TV

The Roku-TV system cannot use the current DSP solution, because the Javascript code can't be parsed by Roku. This documentation explains how to solve this problem in a few steps.

Applicaster provides a plugin for Roku-tv, this plugin parses the DSP manifest.json. This Roku plugin reads the endpoint which is described inside the manifest. Then the Roku App can call an external (REST) service in order to receive the feed data from the client API.

These are the steps to follow so as to enable the data source provider inside Roku TV:

  1. Prerequisites
  2. Update The manifest to V2
  3. About the ContextKeys
  4. Create an external service

Prerequisites

Before the next step, please make sure that you are familiar with the DataSource Provider (DSP) concept. The documentation is here .

Update the manifest to V2

The Roku system parses the plugin manifest and uses the endpoint provided inside the zapp_pipes.v2 section to call the external REST service.

The following JSON object has to be added into the DSP plugin manifest file (plugin-manifest.json).

Complete Manifest Real Example -> Example

    {
      "zapp_pipes": {
        "v2": {
          "data_types": [
            {
              "label": "(string) Name of the feed",
              "value": "(string) ex.: APPLICASTER_COLLECTION",
              "endpoint": "(string) name of the endpoint",
              "documentation": {
                "link": "(string) link to the doc, ex: https://applicaster.zendesk.com/hc/en-us/articles/204644569-Collections",
                "feed_id_description": "(String) Feed description For example: `accounts/xxx/broadcasters/yyy/collections/zzz`",
                "feed_id_description_image_url": "(String) Link to image url description",
                "feed_id_placeholder": "(String) Type the Applicaster Collection ID"
              }
            }
          ],
          "endpoints": [
            {
              "name": "(String) name of the endpoint: for Example : 'app'",
              "remoteUrl": "(String) Path to the remote server, for Example: https://admin.applicaster.com/pipesv2/app/feed",
              "contextKeys": [
                "(String) Parameters inside the app configuration have to be sent to the external server, for Example: 'bundleIdentifier'"
              ]
            }
          ]
        }
      }
    }

Note about the ContextKeys

The ContextKeys array is used to send parameters that are stored on the Roku system, such as authorisation ID etc., to the server, if needed.

The server receives this parameter as a normal query string named CTX that is base64 encoded.

An example of a query can be: "https://pipes.applicaster.com/v2/applicaster/2.0.0/live?feedId=1&ctx=#CTX"

Create a Rest server

Prerequisite: You have to be familiar with the concepts of a REST Server. Good documentation can be read here

A developer can write a REST server in many languages. The important thing is to return the objects described on the Applicaster feed schema API documentantion here as responses.

We provide a starting template of a REST server built in node.js and express .

The template can be cloned/downloaded here .

Please go over the main README file to understand how to install and run the project's REST server here.

Note about the node template:

The template provided mirrors the logic of a normal DSP. The developer can replicate/copy the logic inside the src folder.

The server.js file wraps the logic and allows to manage the request/response using the express framework.

rest-server-structure

results matching ""

    No results matching ""