<% unless @meths.empty? %>
<% @meths.each_with_index do |meth, i| %>

<%= meth.docstring %>

<%= meth.tag(:resource).text %> [<%= meth.tag(:action).text %>]

<% if meth.tags(:required).size > 0 %>

Required Parameters

<% meth.tags(:required).each do |required| %>
  • <%= required.name%> <%= required.types.join%> <%= required.text%>
<% end %>
<% end %> <% if meth.tags(:optional).size > 0 %>

Optional Parameters

<% meth.tags(:optional).each do |optional| %>
  • <%= optional.name%> <%= optional.types.join%> <%= optional.text%>
<% end %>
<% end %>
<% if meth.tags(:response_field).size > 0 %>

Response Fields

<% meth.tags(:response_field).each do |response_field| %>
  • <%= response_field.name%> <%= response_field.types.join%> <%= response_field.text%>
<% end %>
<% end %> <% if meth.tags(:example_request).size > 0 %>

Examples

<% meth.tags(:example_request).each_with_index do |example_request, i| %>
<% example_request_description = meth.tags(:example_request_description)[i] %> <% example_response = meth.tags(:example_response)[i] %> <% example_response_description = meth.tags(:example_response_description)[i] %> <% if example_request_description %> <% if example_request_description.text =~ /\n/im %> <%= htmlify(example_request_description.text, :markdown) %> <% else %> <%= example_request_description.text %> <% end %> <% end %> Request <% if example_request %> <% if example_request.text =~ /\n/im %> <%= htmlify(example_request.text, :markdown) %> <% else %> <%= example_request.text %> <% end %> <% end %> Response <% if example_response %> <% if example_response.text =~ /\n/im %> <%= htmlify(example_response.text, :markdown) %> <% else %> <%= example_response.text %> <% end %> <% end %> <% if example_response_description %> <% if example_response_description.text =~ /\n/im %> <%= htmlify(example_response_description.text, :markdown) %> <% else %> <%= example_response_description.text %> <% end %> <% end %>
<% end %>
<% end %>
<% end %>
<% end %>