code: function (name) {
  			return function (args, onDone) {
  				
  				if (typeof args === 'function') {
  					onDone = args;
  					args = {};
  				}
  				
  				console.log('calling API [' + name + ']...');
  				
  				// NOTE: by default callbacks are always kept
  				SR.sendEvent(name, args, function (result) {
  					if (result.err) {
  						console.error(result.err);
  						return SR.safeCall(onDone, result.err);
  					}
  					
  					SR.safeCall(onDone, null, result.result);
  				}, undefined, true);
  			}
  		}
docs: build a specific API