aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/api-docs.ecr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/views/api-docs.ecr')
-rw-r--r--src/guff/views/api-docs.ecr32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/guff/views/api-docs.ecr b/src/guff/views/api-docs.ecr
new file mode 100644
index 0000000..8611285
--- /dev/null
+++ b/src/guff/views/api-docs.ecr
@@ -0,0 +1,32 @@
+<h1><%= TITLE %></h1>
+
+<div class='section'>
+<h2>Table of Contents</h2>
+<ul><% namespaces.each do |namespace| %>
+ <li>
+ <%= namespace %>
+ <ul><% methods(namespace).each do |method| %>
+ <li>
+ <a
+ href='#m-<%= namespace %>-<%= method %>'
+ title='View <%= namespace %>/<%= method %> details.'
+ >
+ <%= method %>
+ </a>
+ </li>
+ <% end %></ul>
+ </li>
+<% end %></ul>
+</div><!-- section -->
+
+<% namespaces.each do |namespace| %>
+ <% methods(namespace).each do |method| %>
+ <div id='m-<%= namespace %>-<%= method %>' class='section'>
+ <b><%= namespace %>/<%= method %></b>
+
+ <p><%=
+ h(APIMethods::API[namespace][method][:text] as String)
+ %></p>
+ </div><!-- section -->
+ <% end %>
+<% end %>