examples/node/jobs.js
function(args, options, callback) {
            // Get the query and parameters, and remove the extraneous
            // search parameter
            var query = options.search;
            var params = options;
            delete params.search;

            // Create the job
            this.service.jobs().create(query, params, function(err, job) {
                if (err) {
                    callback(err);
                    return;
                }
                
                console.log("Created job " + job.sid);
                callback(null, job);
            });
        }
function(args, options, callback) {
            // Get the query and parameters, and remove the extraneous
            // search parameter
            var query = options.search;
            var params = options;
            delete params.search;

            // Create the job
            this.service.jobs().create(query, params, function(err, job) {
                if (err) {
                    callback(err);
                    return;
                }
                
                console.log("Created job " + job.sid);
                callback(null, job);
            });
        }
function ( args , options , callback ) { // Get the query and parameters, and remove the extraneous // search parameter var query = options . search ; var params = options ; delete params . search ; // Create the job this . service . jobs ( ) . create ( query , params , function ( err , job ) { if ( err ) { callback ( err ) ; return ; } console . log ( "Created job " + job . sid ) ; callback ( null , job ) ; } ) ; }
Create a search job
Create a search job