Slight refactor to the api module, so it will simply extend the client like it did previously, and
also exposes itself on the module.exports so that is can be referenced externally. Added "grunt run" task which currently has a single config, generate_js_api. Removed the api spec submodule, generator just downloads master when it runs.
This commit is contained in:
@ -1082,8 +1082,8 @@ api.get = ca({
|
||||
* Perform a [](http://elasticsearch.org/guide/reference/api/get/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params._source_exclude
|
||||
* @param {String|ArrayOfStrings|Boolean} params._source_include
|
||||
* @param {String|ArrayOfStrings|Boolean} params.exclude
|
||||
* @param {String|ArrayOfStrings|Boolean} params.include
|
||||
* @param {String} params.parent
|
||||
* @param {String} params.preference
|
||||
* @param {Boolean} params.realtime
|
||||
@ -1095,10 +1095,10 @@ api.getSource = ca({
|
||||
'GET'
|
||||
],
|
||||
params: {
|
||||
_source_exclude: {
|
||||
exclude: {
|
||||
type: 'list'
|
||||
},
|
||||
_source_include: {
|
||||
include: {
|
||||
type: 'list'
|
||||
},
|
||||
parent: {
|
||||
|
||||
@ -106,7 +106,7 @@ HttpConnection.prototype.request = function (params, cb) {
|
||||
cleanUp(err);
|
||||
});
|
||||
|
||||
// timeout for the entire request, req.setTimeout only set the socket level timeout
|
||||
// timeout for the entire request.
|
||||
timeoutId = setTimeout(function () {
|
||||
request.emit('error', new errors.RequestTimeout('Request timed out at ' + timeout + 'ms'));
|
||||
}, timeout);
|
||||
|
||||
Reference in New Issue
Block a user