Skip to content
Mike Ralphson edited this page Jul 2, 2017 · 10 revisions

Welcome to the openItv wiki!

New!

Swagger (Open API) specifications for the ITV Hub and Mercury APIs

Example of using the API with the Open Nitro Engine and jgeXml Xml2Json

var itv = require('./openItv.js');
var nitro = require('bbcparse/nitroSdk.js');
var xml2j = require('jgexml/xml2json.js');

var query = nitro.newQuery();
query.add(itv.commonBroadcasterItv)
	.add(itv.commonScreensizeBig);

var options = {};
options.Accept = 'application/xml';
nitro.make_request(itv.host,itv.getApi(itv.commonTargetXml,itv.commonPlatformMobile),'',query,options,function(obj){
	var json = xml2j.xml2json(obj);
	console.log(JSON.stringify(json,null,2));
});

Please consult the 'pages' sidebar of this Wiki for various reference data.