lib/api/job.js
function build(name, params, cb) {
  var body = { parameter: [] } ;
  _.keys(params).forEach(function (key) {
    body.parameter.push({ name: key, value: params[key] });
  });
  var opts = {
    token: 'nestor'
  };
  this.remoteAccessApi.postJobBuild(name, JSON.stringify(body), _.merge(opts, this.opts.headers), cb);
}
function build(name, params, cb) {
  var body = { parameter: [] } ;
  _.keys(params).forEach(function (key) {
    body.parameter.push({ name: key, value: params[key] });
  });
  var opts = {
    token: 'nestor'
  };
  this.remoteAccessApi.postJobBuild(name, JSON.stringify(body), _.merge(opts, this.opts.headers), cb);
}
function build ( name , params , cb ) { var body = { parameter : [ ] } ; _ . keys ( params ) . forEach ( function ( key ) { body . parameter . push ( { name : key , value : params [ key ] } ) ; } ) ; var opts = { token : 'nestor' } ; this . remoteAccessApi . postJobBuild ( name , JSON . stringify ( body ) , _ . merge ( opts , this . opts . headers ) , cb ) ; }
Build a job.

@param {String} name: Jenkins job name
@param {Object|String} params: build parameters key-value pairs, passed as object or 'a=b&c=d' string
@param {Function} cb: standard cb(err, result) callback
Build a job .