36 lines
977 B
Cheetah
36 lines
977 B
Cheetah
<%
|
|
_.each(actions, function (action) {
|
|
var actionId = action.name.toLowerCase().replace(/[^\w]+/g, '-');
|
|
|
|
%>
|
|
|
|
h2#<%= actionId %>.fn
|
|
span.name <%= action.name %>
|
|
span.args (params, [callback])
|
|
a.perma(href="api.html#<%= actionId %>", title="Permalink")
|
|
a.esdoc(href="<%= action.docUrl %>", title="Endpoint Docs")
|
|
//-
|
|
h4 Spec:
|
|
pre
|
|
code <%= JSON.stringify(action, null, ' ').split('\n').map(function (line, i) {
|
|
return (i > 0 ? ' | ' : '') + line;
|
|
}).join('\n') %>
|
|
|
|
<% if (_.size(action.allParams)) { %>
|
|
h3 Params:
|
|
dl.params.api
|
|
<% _.each(action.allParams, function (param, paramName) { %>
|
|
dt: dfn: code <%= paramWithDefault(paramName, param.default) %>
|
|
dd.
|
|
<span class="types"><%= paramType(param.type) %></span>
|
|
<%= indent(param.description || '', 4) %><%
|
|
}); %>
|
|
<% } %>
|
|
p.
|
|
Default method: <%= action.spec.method || 'GET' %><br>
|
|
Includes <a href="#api-conventions-return">the usual</a>
|
|
|
|
include _examples/<%= action.name %>.jade<%
|
|
});
|
|
%>
|