client/splunk.js
function(params, callback) {
            callback = callback || function() {};
            params = params || {};
            params.output_mode = params.output_mode || "json_rows"; 
            
            var that = this;
            return this.get("events", params, function(err, response) {
                if (err) {
                    callback(err);
                }
                else {
                    callback(null, response.data, that);
                }
            });
        }
function(params, callback) {
            callback = callback || function() {};
            params = params || {};
            params.output_mode = params.output_mode || "json_rows"; 
            
            var that = this;
            return this.get("events", params, function(err, response) {
                if (err) {
                    callback(err);
                }
                else {
                    callback(null, response.data, that);
                }
            });
        }
function ( params , callback ) { callback = callback || function ( ) { } ; params = params || { } ; params . output_mode = params . output_mode || "json_rows" ; var that = this ; return this . get ( "events" , params , function ( err , response ) { if ( err ) { callback ( err ) ; } else { callback ( null , response . data , that ) ; } } ) ; }
Returns the events of a search job with given parameters.

@example

var job = service.jobs().item("mysid");
job.events({count: 10}, function(err, events, job) {
console.log("Fields: ", events.fields);
});

@param {Object} params The parameters for retrieving events. For a list of available parameters, see the <a href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#GET_search.2Fjobs.2F.7Bsearch_id.7D.2Fevents" target="_blank">GET search/jobs/{search_id}/events</a> endpoint in the REST API documentation.
@param {Function} callback A function to call when the events are retrieved: `(err, events, job)`.

@endpoint search/jobs/{search_id}/events
@method splunkjs.Service.Job
Returns the events of a search job with given parameters .