Conforming fire app builder search parameters to Roku JSON feed

18 Views Asked by At

I am putting today an app using fire app builder and attempting to conform the categories recipe and content recipe to align with my JSON feed schema. This is a sample of my JSON feed:

{
  "lastUpdated": "2023-06-30T11:55:24+00:00",
  "providerName": "Nation Extreme Wrestling",
  "language": "en-US",
  "series": [
    {
      "id": "db771e79bbcf433cb3b417865abf6cde",
      "title": "Nation Extreme Wrestling",
      "seasons": [
        {
          "seasonNumber": 1,
          "title": "NEW 1",
          "episodes": [
            {
              "id": "ead12e119ec74af78de702aee7131fe2",
              "title": "Travis Williams vs Judas Icarus",
              "content": {
                "dateAdded": "2023-06-19T14:26:56+00:00",
                "videos": [
                  {
                    "url": "(URL)cloudfront.net/NEW+1/Travis_Williams_vs_Judas_Icarus_(S1-EP1)/master.m3u8",
                    "quality": "FHD",
                    "videoType": "hls"
                  }
                ],
                "duration": 904,
                "language": "en-US"
              },
              "thumbnail": "(URL)cloudfront.net/NEW+1/Travis_Williams_vs_Judas_Icarus_(S1-EP1)/Travis+Williams+vs+Judas+Icarus+(S1-EP1).png",
              "episodeNumber": 1,
              "releaseDate": "2023-07-04",
              "shortDescription": "Golden Boy takes it to Judas Icarus",
              "longDescription": "These guys have been at it many times before, but tonight Travis is going to prove he is going to the top and he's one of the true players in the Pacific Northwest",
              "credits": [
                {
                  "name": "Travis Williams",
                  "role": "",
                  "birthDate": ""
                },
                {
                  "name": "Judas Icarus",
                  "role": "",
                  "birthDate": ""
                }
              ],
              "rating": {
                "rating": "TVPG",
                "ratingSource": "USA_PR"
              }
            },

This is how I have written the categories recipe:

{
  "cooker": "DynamicParser",
  "format": "json",
  "model": "com.amazon.android.model.content.ContentContainer",
  "translator": "ContentContainerTranslator",
  "modelType": "array",
  "query": "$..series[*]",
  "queryResultType": "[]$",
  "matchList": [
    "StringKey@mName"
  ],
  "keyDataType": "series/seasons/episodes@keyDataPath"

}

This how I have written the content recipe:

{
  "cooker": "DynamicParser",
  "format": "json",
  "model": "com.amazon.android.model.content.Content",
  "translator": "ContentTranslator",
  "modelType": "array",
  "query": "$[?(@.series[0] in [$$par0$$])]",
  "matchList": [
    "series/seasons/episodes/title@mTitle",
    "series/seasons/episodes/id@mId",
    "series/seasons/episodes/longDescription@mDescription",
    "series/seasons/episodes/content/videos/url@mUrl",
    "series/seasons/episodes/thumbnail@mCardImageUrl",
    "series/seasons/episodes/thumbnail@mBackgroundImageUrl"
  ]
}

I keep getting an service is unavailable error when I run the app on my testing device. I checked the catlog and it says the system is getting a null or missing value for the mName variable in the matchList.

I have reformatted the categories and content recipes to variations of the datapoint locations. I am confused as series seems to be a root category and everything should stem from there. Have I formatted the query and matchList parameters correctly according to the structure of my JSON feed?

0

There are 0 best solutions below