bloodhound-rpc / trunk / tracrpc / templates / rpc.html

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns=""
  <xi:include href="layout.html" />
  <xi:include href="macros.html" />
    <title>Remote Procedure Call (RPC)</title>
    <div id="content" class="wiki">
      <div class="wikipage searchable">
        <h1>Remote Procedure Call (RPC)</h1>
        <p><strong>Installed API version :</strong> ${rpc.version} </p>
        <h2 id="Protocols">Protocol reference:</h2>
        <p>Below you will find a detailed description of all the RPC 
          protocols installed in this environment. This includes 
          supported content types as well as target URLs for 
          anonymous and authenticated access. Use this 
          information to interact with this environment from 
          a remote location.
        <p>Libraries for remote procedure calls and parsing exists
          for most major languages and platforms - use a tested, standard library
          for consistent results.</p>
        <dl py:for="protocol in rpc.protocols">
          <h3 id="${protocol[0]}">${protocol[0]}</h3>
            <p>For ${protocol[0]} protocol, use any one of:</p>
              <li py:for="ct, _ct_group in groupby(protocol[2], lambda (_, x) : x)">
                <tt>{'Content-Type': '$ct'}</tt> header with request to:
                <py:with vars="ct_group = list(_ct_group)">
                    <li py:for="h, _ in ct_group">
                      <a href="${req.abs_href(h)}">${req.abs_href(h)}</a> 
                      for anonymous access
                    <li py:for="h, _ in ct_group">
                      <a href="${req.abs_href.login(h)}">${req.abs_href.login(h)}</a>
                      for authenticated access
            ${wiki_to_html(context, expand_docs(protocol[1], locals()['__data__']))}
        <h2 id="Methods">RPC exported functions</h2>
        <div id="searchable">
          <dl py:for="key in sorted(rpc.functions)" py:with="namespace = rpc.functions[key]">
            <h3 id="${'rpc.' + to_unicode(namespace.namespace)}">
              ${namespace.namespace} - <small>${namespace.description}</small>
              <table class="listing tickets">
                    <th style="width:40%">Function</th>
                    <th style="width:45%">Description</th>
                    <th style="width:15%">Permission required</th>
                <tbody py:for="idx, function in enumerate(namespace.methods)">
                  <tr class="${'color3-' + (idx % 2 == 0 and 'even' or 'odd')}">
                    <td style="padding-left:4em;text-indent:-4em">${function[0]}</td>
                    <td>${function[2] or "By resource"}</td>