This handler is invoked once data is fetched from fixtures directory. This would be moved to a remote repo.This handler is responsible for publish the fetched data via PubSub with method parameter set to "dataFetch".In the sample intent,we are fetching content validation data from Titan and JSON based on platform.
-
Sample Intent
{ "action": "search", "data": { "query": "{\"task\":\"dataFetch\",\"params\":{\"data\":{\"platform\":\"hisense\",\"device\":{\"distributor\":\"xglobal\",\"platform\":\"WPE\",\"type\":\"smarttv\",\"model\":\"xtv\",\"make\":\"hisense\",\"version\":{\"os\":{\"major\":0,\"minor\":1,\"patch\":0,\"readable\":\"Firebolt OS v0.1.0\"},\"sdk\":{\"major\":0,\"minor\":5,\"patch\":3,\"readable\":\"The Firebolt JS SDK\"}},\"hdcp\":{\"hdcp1.4\":true,\"hdcp2.2\":true},\"hdr\":{\"hdr10\":true,\"hlg\":true,\"dolbyVision\":true},\"audio\":{\"stereo\":true,\"dolbyDigital5.1\":true,\"dolbyDigital5.1+\":true,\"dolbyDigital7.1\":true,\"dolbyAtmos\":true},\"screenResolution\":[1920,1080],\"videoResolution\":[3840,2160],\"network\":{\"state\":\"connected\",\"type\":\"wifi\"}},\"account\":{\"id\":\"\",\"uid\":\"\"},\"advertising\":{\"adsOff\":{\"config\":{\"nocoppavalue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueFalse\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueTrue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"1\",\"authenticationEntity\":\"\"}},\"policy\":{\"limitAdTracking\":true},\"advertisingId\":{\"ifa\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"deviceAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"appBundleId\":\"your-appBundle-ID\"},\"adsOn\":{\"config\":{\"nocoppavalue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueFalse\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueTrue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"1\",\"authenticationEntity\":\"\"}},\"policy\":{\"limitAdTracking\":false},\"advertisingId\":{\"ifa\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"deviceAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"appBundleId\":\"your-appBundle-ID\"}},\"localization\":{\"locality\":\"\",\"postalCode\":\"66952\",\"countryCode\":\"US\",\"language\":\"en\",\"locale\":\"en-US\",\"latlon\":\"\",\"additionalInfo\":{}},\"parameters\":{\"initialization_off\":{\"lmt\":\"1\",\"us_privacy\":\"1-Y-\",\"discovery\":{\"navigateTo\":{\"action\":\"home\",\"data\":{},\"context\":{\"source\":\"editorial\"}}}},\"initialization_on\":{\"lmt\":\"0\",\"us_privacy\":\"1-N-\",\"discovery\":{\"navigateTo\":{\"action\":\"home\",\"data\":{},\"context\":{\"source\":\"editorial\"}}}}},\"profile\":{\"flags\":{\"userExperience\":\"1001\"}},\"secondscreen\":{\"protocols\":{\"dial2\":true}}}},\"action\":\"NA\",\"appType\":\"firebolt\"}" }, "context": { "source": "device" } }
-
Required Intent Fields :
- action: "search"
- data: { query: "{"task":"dataFetch", "params":"data":{ "platform":"hisense", "device":{"distributor":"xglobal","platform":"WPE","type":"smarttv","model":"xtv","make":"hisense", "version":{"os":{"major":0,"minor":1,"patch":0,"readable":"Firebolt OS v0.1.0"},"sdk":{"major":0,"minor":5,"patch":3,"readable":"The Firebolt JS SDK"}}, "hdcp":{"hdcp1.4":true,"hdcp2.2":true}, "hdr":{"hdr10":true,"hlg":true,"dolbyVision":true}, "audio":{"stereo":true,"dolbyDigital5.1":true,"dolbyDigital5.1+":true,"dolbyDigital7.1":true,"dolbyAtmos":true},"screenResolution":[1920,1080],"videoResolution":[3840,2160],"network":{"state":"connected","type":"wifi"}}, "advertising":{"adsOff":{ "config":{"nocoppavalue":{"adOptOut":true,"privacyData":{"us_privacy":"1-Y-","pdt":"gdp:v1","lmt":"1"},"ifa":{"ifa_type":"sessionId","lmt":"1"},"appName":"your-appName","appBundleID":"your-appBundle-ID","distributorAppID":"1001","deviceAdAttributes":{"boAttributesForRevShareId":"1112"},"coppa":"0"}, "coppavalueFalse":{"adOptOut":true,"privacyData":{"us_privacy":"1-Y-","pdt":"gdp:v1","lmt":"1"},"ifa":{"value":"","ifa_type":"sessionId","lmt":"1"},"appName":"your-appName","appBundleID":"your-appBundle-ID","distributorAppID":"1001","deviceAdAttributes":{"boAttributesForRevShareId":"1112"},"coppa":"0","authenticationEntity":""},"coppavalueTrue":{"adOptOut":true,"privacyData":{"us_privacy":"1-Y-","pdt":"gdp:v1","lmt":"1"},"ifa":{"value":"","ifa_type":"sessionId","lmt":"1"},"appName":"your-appName","appBundleID":"your-appBundle-ID","distributorAppID":"1001","deviceAdAttributes":{"boAttributesForRevShareId":"1112"},"coppa":"1"}}, "policy":{"limitAdTracking":true},"advertisingId":{"ifa":"","ifa_type":"sessionId","lmt":"1"},"deviceAttributes":{"boAttributesForRevShareId":"1112"},"appBundleId":"your-appBundle-ID"}, "adsOn":{"config":{"nocoppavalue":{"adOptOut":false,"privacyData":{"us_privacy":"1-N-","pdt":"gdp:v1","lmt":"0"},"ifaValue":"","ifa":{"value":"","ifa_type":"sspid","lmt":"0"},"appName":"your-appName","appBundleID":"your-appBundle-ID","distributorAppID":"1001","deviceAdAttributes":{"boAttributesForRevShareId":"1112"},"coppa":"0"}
- context: { "source": "device"}
-
Optional Intent Fields :
- data: { query:"{ "params":"data":{"account":{"id":"","uid":""},"advertising":{"adsOff":{"config":{"nocoppavalue":{"adServerUrl":"","adServerUrlTemplate":"","adNetworkID":"","adProfileID":"","adSiteSectionID":"""ifaValue":"","ifa":{"value":""},"authenticationEntity":"","coppavalueFalse":{"adServerUrl":"","adServerUrlTemplate":"","adNetworkID":"","adProfileID":"","adSiteSectionID":"",,"ifaValue":"","ifa":{"value":"",},"coppavalueTrue":{"adServerUrl":"","adServerUrlTemplate":"","adNetworkID":"","adProfileID":"","adSiteSectionID":"","ifaValue":"","authenticationEntity":"","adsOn":{"config":{"nocoppavalue":{"adServerUrl":"","adServerUrlTemplate":"","adNetworkID":"","adProfileID":"","adSiteSectionID":"",,"authenticationEntity":""}{"action":"NA"}"}
-
Scenario: If we are not able publish the data via PubSub with method parameter set to "dataFetch"
{ "action": "search", "data": { "query": "{\"task\":\"dataFetch\",\"params\":{\"data\":{\"platform\":\"hisense\",\"device\":{\"distributor\":\"xglobal\",\"platform\":\"WPE\",\"type\":\"smarttv\",\"model\":\"xtv\",\"make\":\"hisense\",\"version\":{\"os\":{\"major\":0,\"minor\":1,\"patch\":0,\"readable\":\"Firebolt OS v0.1.0\"},\"sdk\":{\"major\":0,\"minor\":5,\"patch\":3,\"readable\":\"The Firebolt JS SDK\"}},\"hdcp\":{\"hdcp1.4\":true,\"hdcp2.2\":true},\"hdr\":{\"hdr10\":true,\"hlg\":true,\"dolbyVision\":true},\"audio\":{\"stereo\":true,\"dolbyDigital5.1\":true,\"dolbyDigital5.1+\":true,\"dolbyDigital7.1\":true,\"dolbyAtmos\":true},\"screenResolution\":[1920,1080],\"videoResolution\":[3840,2160],\"network\":{\"state\":\"connected\",\"type\":\"wifi\"}},\"account\":{\"id\":\"\",\"uid\":\"\"},\"advertising\":{\"adsOff\":{\"config\":{\"nocoppavalue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueFalse\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueTrue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":true,\"privacyData\":{\"us_privacy\":\"1-Y-\",\"pdt\":\"gdp:v1\",\"lmt\":\"1\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"1\",\"authenticationEntity\":\"\"}},\"policy\":{\"limitAdTracking\":true},\"advertisingId\":{\"ifa\":\"\",\"ifa_type\":\"sessionId\",\"lmt\":\"1\"},\"deviceAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"appBundleId\":\"your-appBundle-ID\"},\"adsOn\":{\"config\":{\"nocoppavalue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueFalse\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"0\",\"authenticationEntity\":\"\"},\"coppavalueTrue\":{\"adServerUrl\":\"\",\"adServerUrlTemplate\":\"\",\"adNetworkID\":\"\",\"adProfileID\":\"\",\"adSiteSectionID\":\"\",\"adOptOut\":false,\"privacyData\":{\"us_privacy\":\"1-N-\",\"pdt\":\"gdp:v1\",\"lmt\":\"0\"},\"ifaValue\":\"\",\"ifa\":{\"value\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"appName\":\"your-appName\",\"appBundleID\":\"your-appBundle-ID\",\"distributorAppID\":\"1001\",\"deviceAdAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"coppa\":\"1\",\"authenticationEntity\":\"\"}},\"policy\":{\"limitAdTracking\":false},\"advertisingId\":{\"ifa\":\"\",\"ifa_type\":\"sspid\",\"lmt\":\"0\"},\"deviceAttributes\":{\"boAttributesForRevShareId\":\"1112\"},\"appBundleId\":\"your-appBundle-ID\"}},\"localization\":{\"locality\":\"\",\"postalCode\":\"66952\",\"countryCode\":\"US\",\"language\":\"en\",\"locale\":\"en-US\",\"latlon\":\"\",\"additionalInfo\":{}},\"parameters\":{\"initialization_off\":{\"lmt\":\"1\",\"us_privacy\":\"1-Y-\",\"discovery\":{\"navigateTo\":{\"action\":\"home\",\"data\":{},\"context\":{\"source\":\"editorial\"}}}},\"initialization_on\":{\"lmt\":\"0\",\"us_privacy\":\"1-N-\",\"discovery\":{\"navigateTo\":{\"action\":\"home\",\"data\":{},\"context\":{\"source\":\"editorial\"}}}}},\"profile\":{\"flags\":{\"userExperience\":\"1001\"}},\"secondscreen\":{\"protocols\":{\"dial2\":true}}}},\"action\":\"NA\",\"appType\":\"firebolt\"}" }, "context": { "source": "device" } }
-
Sample response
PubSub topic is not found in env variable