Guide for creating a feeds for a single channel EPG on Quick Brick

Introduction

Zapp treats EPG like any other data on the app via that use of DSP and feeds. This guide explains how to create an JSON Feed EPG data for presenting a single channel EPG on your app.

You can always develop your own EPG implementation in a custom DSP but if you prefer the default JSON feed DSP this document will guide you how to do that.

The goal of this guide is to create all needed feeds for an EPG screen in your app. The EPG screen will be compromised from 7 tabs - each tab will represent a day - e.g. the first tab will show today's program guide, the second tab will represent tomorrow's program guide and so on.

You'll need to make sure that each day you update the tabs feeds - we recommend to do it programmatically but you can do it manually each day if you prefer to do so.

Note: Make sure that servers that host the JSON feeds can hold the amount of expected concurrent users. As a rule of thumb the JSON Feeds should be cached and served via a CDN.

Feeds output

You'll need to create 8 JSON feeds: The first feed will be the root feed that will hold links to the 7 feeds that will populate the days tabs. You'll use the URL of the root feed to populate the EPG feed in Zapp UI builder.

Root feed structure

{
    "title": "EPG",
    "entry": [
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_1_LABEL> (e.g. MON 3/30)",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_1_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_2_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_2_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_3_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_3_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_4_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_4_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_5_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_5_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_6_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_6_CONTENT>"
            },
        },
        {
            "type": {
                "value": "feed"
            },
            "id": "<UNIQUE_ID>",
            "title": "<TAB_7_LABEL>",
            "content": {
             "src": "general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_7_CONTENT>"
            },
        }
    ]

}
  • The entry field holds the array of links for the tab.
  • Use the title to label the tab name e.g. (MON 3/30) make sure you change the tab title to conform with the dates you want to represent in that tab.
  • Use the src field (nested in the content field) to provide a link to the tab content: You'll need to BASE64 encode the tab URL and then URL_ENCODE it. Then you'll need to populate the encoded string inside the following string: general-provider://fetchData?type=FEED_JSON&url=<URL_ENCODED_BASE64_ENCODE_URL_OF_THE_TAB_CONTENT>.
  • Populate the id field of each entry with a unique id.

Tab feed structure


{
    "title": "<TODAY'S_DATE>",
    "entry": [
        {
            "type": {
                "value": "program"
            },
             "id": "<UNIQUE_ID>",
             "title": "<PROGRAM_TITLE>",
             "extensions": {
                 "start_time": "<ISO_8601_FORMATED_DATE>",
                 "end_time": "<ISO_8601_FORMATED_DATE>",
                 "hour_label": "<HOUR_LABEL>",
                 "show_label": "<SHOW_LABEL>",
                 "program_description_text": "<PROGRAM_DESCRIPTION>",
                 "channel_label": "<CHANNEL_LABEL>"

             }

        },
        {
           // ... More programs
        }
    ]
}

For each day/tab that you want to show, create a JSON feed and link it in the root feed as described above.

  • Each entry should have a unique id
  • Each entry should have an extensions field with start_time & end_time nested feeds - Quick Brick is using the data in the start_time to allow to set reminders to EPG programs
  • You can add any custom extensions as you like to represent any needed data in the program cell - Inside the Zapp UI builder cell styles section you'll be able to map any custom extension to a label in your cell.

results matching ""

    No results matching ""