docs: function processPid(host,path,api_key,pid) {
  	var query = nitro.newQuery();
  	query.add(api.fProgrammesPageSize,pageSize,true)
  		.add(api.mProgrammesContributions)
  		.add(api.mProgrammesDuration)
  		.add(api.mProgrammesAncestorTitles)
  		.add(api.mProgrammesAvailableVersions)
  		.add(api.mProgrammesGenreGroupings)
  
  	if (upcoming || children) {
  		query.add(api.fProgrammesDescendantsOf,pid)
  		.add(api.fProgrammesAvailabilityPending);
  	}
  	else {
  		query.add(api.fProgrammesPid,pid)
  	}
  	if (partner_pid != '') {
  		query.add(api.fProgrammesPartnerPid,partner_pid);
  	}
  	else {
  		if (pending) {
  			query.add(api.fProgrammesAvailability,'P30D');
  		}
  		else {
  			query.add(api.fProgrammesAvailabilityAvailable);
  		}
  		query.add(api.mProgrammesAvailability); // has a dependency on 'availability'
  	}
  	if (episode_type == 'clip') {
  		query.add(api.fProgrammesAvailabilityEntityTypeClip);
  	}
  	else if ((episode_type == 'brand') || (episode_type == 'series')) {
  		query.add(api.fProgrammesEntityType,episode_type);
  	}
  	else {
  		query.add(api.fProgrammesAvailabilityEntityTypeEpisode);
  	}
  	if (embargoed) {
  		query.add(api.xProgrammesEmbargoed,embargoed);
  	}
  	if (payment_type) {
  		query.add(api.fProgrammesPaymentType,payment_type);
  	}
  	nitro.make_request(host,path,api_key,query,{},function(obj){
  		return dispatch(obj);
  	});
  }