docs: function(obj) {
  	var nextHref = '';
  	if ((obj.nitro.pagination) && (obj.nitro.pagination.next)) {
  		nextHref = obj.nitro.pagination.next.href;
  		//console.log(nextHref);
  	}
  	var pageNo = obj.nitro.results.page;
  	var top = obj.nitro.results.total;
  	if (!top) {
  		top = obj.nitro.results.more_than+1;
  	}
  	var last = Math.ceil(top/obj.nitro.results.page_size);
  	//console.log('page '+pageNo+' of '+last);
  	process.stdout.write('.');
  
  	var length = 0;
  	if (obj.nitro.results.items) {
  		length = obj.nitro.results.items.length;
  	}
  
  	if (length==0) {
  		console.log('No results returned');
  	}
  	else {
  		for (var i in obj.nitro.results.items) {
  			var item = obj.nitro.results.items[i];
  
  			debuglog(item);
  
  			// minimally convert a broadcast into a programme for display
  			var p = {};
  			p.ancestor_titles = item.ancestor_titles;
  			p.available_versions = {};
  			p.available_versions.available = 1;
  
  			p.version = {};
  			p.version.duration = (item.published_time ? item.published_time.duration : '');
  			p.synopses = {};
  			p.media_type = (item.service.sid.indexOf('radio')>=0 ? 'Audio' : 'Video');
  			p.image = item.image;
  			p.master_brand = {};
  			p.master_brand.mid = item.service.sid; //!
  			p.release_date = item.published_time.start;
  
  			for (var b in item.broadcast_of) {
  				var bof = item.broadcast_of[b];
  				if ((bof.result_type == 'episode') || (bof.result_type == 'clip')) {
  					p.item_type = bof.result_type;
  					p.pid = bof.pid;
  				}
  				else if (bof.result_type == 'version') {
  					p.version.pid = bof.pid;
  				}
  			}
  			for (var a in item.ancestor_titles) {
  				var at = item.ancestor_titles[a];
  				if ((at.ancestor_type == 'episode') || (at.ancestor_type == 'clip')) {
  					p.title = at.title;
  				}
  			}
  
  			// item.ids.id is an array of submissions(?) to broadcast schedule services
  
  			var present = false;
  			for (var pc in programme_cache) {
  				var pci = programme_cache[pc];
  				if (pci.pid == p.pid) present = true;
  			}
  			if (!present) programme_cache.push(p);
  		}
  	}
  
  	var dest = {};
  	if (pageNo<last) {
  		dest.path = '/nitro/api/schedules';
  		dest.query = nitro.queryFrom(nextHref,true); // TODO
  		dest.callback = scheduleResponse;
  	}
  	// if we need to go somewhere else, e.g. after all pages received set callback and/or path
  	nitro.setReturn(dest);
  	return true;
  }