43 lines
1.2 KiB
Cheetah
43 lines
1.2 KiB
Cheetah
[[api-reference<%= branchSuffix %>]]<%
|
|
|
|
if ( branch === 'master' ) {%>
|
|
== 1.0 API
|
|
|
|
NOTE: At this time, you must opt into the 1.0 API by setting the `apiVerion` config parameter.<%
|
|
} else {%>
|
|
== 0.90 API
|
|
|
|
NOTE: This is currently the default API, but with the upcoming release of Elasticsearch 1.0 that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change when the default does.<%
|
|
}
|
|
|
|
_.each(actions, function (action) {
|
|
%>
|
|
|
|
[[<%= 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix %>]]
|
|
=== `<%= action.name %>`
|
|
|
|
[source,js]
|
|
--------
|
|
client.<%= action.name %>([params, [callback]])
|
|
--------
|
|
|
|
<%= description(action.name) %>
|
|
|
|
The default method is `<%= action.spec.method || 'GET' %>` and the usual <<api-conventions,params and return values>> apply. See <%= action.docUrl %>[the elasticsearch docs] for more about this method.
|
|
|
|
<%= examples(action.name) %>
|
|
|
|
<% if (_.size(action.allParams)) { %>
|
|
==== Params
|
|
|
|
[horizontal]<%
|
|
_.each(action.allParams, function (param, paramName) { %>
|
|
`<%= paramWithDefault(paramName, param.default) %>`::
|
|
`<%= paramType(param.type) %>` -- <%= joinParagraphs(param.description || '', 4) %><%
|
|
|
|
}); // endeach
|
|
} // endif
|
|
|
|
}); // endeach
|
|
%>
|