--- a/doc/current.html Fri Mar 30 16:39:12 2012 +0200
+++ b/doc/current.html Mon Apr 23 21:38:30 2012 +0200
@@ -3,7 +3,7 @@
<head>
- <title>Iro · API docs</title>
+ <title>Iro · api docs current</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<meta name="description" content="">
@@ -19,349 +19,501 @@
<div id="head">
<h1 id="logo"><a href="index.html" class="logo" title="Netzguerilla"><span>Netzguerilla</span></a></h1>
<ul id="menu">
- <li><a href="index.html" class="menu">Iro</a></li><li><a href="current.html" class="menu active">API Documentation</a></li><li><a href="new.html" class="menu">geplante API Documentation</a></li><li><a href="database.html" class="menu">Datenbank Schema</a></li><li><a href="impressum.html" class="menu">Impressum</a></li>
+ <li><a href="index.html" class="menu">Iro</a></li><li><a href="current.html" class="menu active">API Documentation</a></li><li><a href="database.html" class="menu">Datenbase Schema</a></li><li><a href="about.html" class="menu">About us</a></li>
</ul>
</div>
</div>
<div id="content-container">
<div id="content" class="container_12">
<div id="main" class="grid_9">
- <h2>API Dokumentation</h2>
+ <h2>API Documentation</h2>
<div class="item">
<p>
</p>
<ol>
- <li value="1">1. <a href="#api-intro">Einführung</a></li>
+ <li value="1">1. <a href="#api-intro">Intro</a></li>
<li value="2">2.
- <a href="#api-interfaces">Interfaces</a>
- <ol>
- <li value="2.1">2.1 <a href="#interface-xmlrpc">XML-RPC</a></li>
- </ol>
+ <a href="#api-interfaces">Interfaces</a>
+ <ol>
+ <li value="2.1">2.1 <a href="#interface-xmlrpc">XML-RPC</a></li>
+ <li value="2.1">2.2 <a href="#interface-soap">SOAP</a></li>
+ <li value="2.3">2.3 <a href="#interface-json">JSON</a></li>
+ <li value="2.4">2.4 <a href="#interface-jsonp">JSONP</a></li>
+ </ol>
</li>
<li value="3">3.
- <a href="#api-methods">Methoden</a>
+ <a href="#api-methods">Methods</a>
<ol>
- <li value="3.1">3.1 <a href="#method-startSMS">StartSMS</a></li><li value="3.2">3.2 <a href="#method-startFAX">StartFAX</a></li><li value="3.3">3.3 <a href="#method-startMail">StartMail</a></li><li value="3.4">3.4 <a href="#method-status">Status</a></li><li value="3.5">3.5 <a href="#method-stop">Stop</a></li><li value="3.6">3.6 <a href="#method-getProvider">GetProvider</a></li><li value="3.7">3.7 <a href="#method-getDefaultProvider">GetDefaultProvider</a></li>
+ <li value="3.1">3.1 <a href="#method-status">Status</a></li><li value="3.2">3.2 <a href="#method-sms">Sms</a></li><li value="3.3">3.3 <a href="#method-fax">Fax</a></li><li value="3.4">3.4 <a href="#method-mail">Mail</a></li><li value="3.5">3.5 <a href="#method-routes">Routes</a></li><li value="3.6">3.6 <a href="#method-defaultRoute">DefaultRoute</a></li><li value="3.7">3.7 <a href="#method-bill">Bill</a></li><li value="3.8">3.8 <a href="#method-telnumber">Telnumber</a></li><li value="3.9">3.9 <a href="#method-email">Email</a></li>
</ol>
</li>
</ol>
</div><div class="item" id="api-intro">
- <h3>Einführung</h3>
+ <h3>Intro</h3>
<p>
- Die Iro API enthält Funktion, die für den Massenversand nützlich sind.
+ Iro API has many methods, that are usefull if you want to send a bunch of messages. This Site describes the API for Iro 1.0.
</p>
</div><div class="item" id="api-interfaces">
<h3>Interfaces</h3>
<p>
- Die Iro API stellt zur Zeit nur ein Interfaces bereit.
+ You can use diffrent interfaces to get to same result.
</p>
<div class="item" id="interface-xmlrpc">
<h4>XML-RPC</h4>
<p>
- Interface-URI: <code>https://<em><benutzer></em>:<em><passwort></em>@localhost:8000</code>
+ Interface-URI: <code>http://localhost:8000/xmlrpc</code>
+ </p>
+ </div>
+ <div class="item" id="interface-soap">
+ <h4>SOAP</h4>
+ <p>
+ Interface-URI: <code>http://localhost:8000/soap</code>
+ </p>
+ </div>
+ <div class="item" id="interface-json">
+ <h4>JSON</h4>
+ <p>
+ Interface-URI: <code>http://localhost:8000/json/<em><methode></em></code>
</p>
<p>
- Die aufgerufene Methode wird dabei im <code><methodName /></code> übergeben.
+ Not yet implementet
+ </p>
+ </div>
+ <div class="item" id="interface-jsonp">
+ <h4>JSONP</h4>
+ <p>
+ Interface-URI: <code>http://localhost:8000/jsonp/<em><methode></em>?callback=<callback></code>
+ </p>
+ <p>
+ Not yet implementet
</p>
</div>
</div><div class="item" id="api-methods">
- <h3>Methoden</h3>
- <div class="item" id="method-startSMS">
- <h4>StartSMS</h4>
- <p><code>startSMS(message, recipients, provider='default')</code></p>
- <p>Versendet eine SMS.</p>
+ <h3>Methods</h3>
+ <div class="item" id="method-status">
+ <h4>Status</h4>
+ <p><code>status(user=None, id=False, detailed=None)</code></p>
+ <p>Returns the status of one or more jobs.</p>
<h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
+ </tr><tr>
+ <td>id</td>
+ <td>integer</td>
+ <td>one job id</td>
+ </tr><tr>
+ <td>detailed</td>
+ <td>boolean</td>
+ <td>return more details about the status</td>
+ </tr>
+ </tbody>
+ </table>
+ <h5>Return</h5>
+ <table class="docs">
+ <thead>
+ <tr>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>message</td>
- <td>string</td>
- <td> Nachricht</td>
- </tr><tr>
- <td>recipients</td>
- <td>list</td>
- <td> eine Liste von Emfänger-Nummern (gemäß ITU-T E.123)</td>
- </tr><tr>
- <td>provider</td>
- <td>string</td>
- <td> Provider über den geschickt werden soll</td>
+ <td>return</td>
+ <td>dict</td>
+ <td><ul class="simple">
+<li><cite>key</cite> -- is the job id</li>
+<li>[<cite>key</cite>][<strong>'status'</strong>] -- status of the job</li>
+</ul></td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ </div><div class="item" id="method-sms">
+ <h4>Sms</h4>
+ <p><code>sms(user, message, recipients, route='default', info='')</code></p>
+ <p>Send a sms.</p>
+ <h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>id</td>
- <td>hash</td>
- <td> Die ID des Auftrages</td>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
+ </tr><tr>
+ <td>message</td>
+ <td>string</td>
+ <td>message</td>
+ </tr><tr>
+ <td>recipients</td>
+ <td>list</td>
+ <td>a list of telefon numbers (use ITU-T E.123)</td>
+ </tr><tr>
+ <td>route</td>
+ <td>string|list</td>
+ <td>route to use to send, or a list of routes as fallback</td>
+ </tr><tr>
+ <td>info</td>
+ <td>string</td>
+ <td>a name, to combine different jobs to one billing group</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-startFAX">
- <h4>StartFAX</h4>
- <p><code>startFAX(subject, fax, recipients, provider='default')</code></p>
- <p>Versendet ein FAX.</p>
- <h5>Parameter</h5>
+ <h5>Return</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>subject</td>
- <td>string</td>
- <td> der Betreff</td>
- </tr><tr>
- <td>fax</td>
- <td>string</td>
- <td> das pdf base64 kodiert</td>
- </tr><tr>
- <td>recipients</td>
- <td>list</td>
- <td> eine Liste von Emfänger-Nummern (gemäß ITU-T E.123)</td>
- </tr><tr>
- <td>provider</td>
- <td>string</td>
- <td> Provider über den geschickt werden soll</td>
+ <td>return</td>
+ <td>integer</td>
+ <td>the job id</td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ </div><div class="item" id="method-fax">
+ <h4>Fax</h4>
+ <p><code>fax(user, subject, fax, recipients, route='default', info='')</code></p>
+ <p>Send a fax.</p>
+ <h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>id</td>
- <td>hash</td>
- <td> Die ID des Auftrages</td>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
+ </tr><tr>
+ <td>subject</td>
+ <td>string</td>
+ <td>subject</td>
+ </tr><tr>
+ <td>fax</td>
+ <td>string</td>
+ <td>content (base64 encoded)</td>
+ </tr><tr>
+ <td>recipients</td>
+ <td>list</td>
+ <td>a list of telefon numbers (use ITU-T E.123)</td>
+ </tr><tr>
+ <td>route</td>
+ <td>string|list</td>
+ <td>route to use to send, or a list of routes as fallback</td>
+ </tr><tr>
+ <td>info</td>
+ <td>string</td>
+ <td>a name, to combine different jobs to one billing group</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-startMail">
- <h4>StartMail</h4>
- <p><code>startMail(subject, body, recipients, frm, provider='default')</code></p>
- <p>Versendet eine Email.</p>
+ <h5>Return</h5>
+ <table class="docs">
+ <thead>
+ <tr>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>return</td>
+ <td>integer</td>
+ <td>the job id</td>
+ </tr>
+ </tbody>
+ </table>
+ </div><div class="item" id="method-mail">
+ <h4>Mail</h4>
+ <p><code>mail(user, subject, body, recipients, frm=None, route='default', info='')</code></p>
+ <p>Send a mail.</p>
<h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
+ </tr><tr>
<td>subject</td>
<td>string</td>
- <td> der Betreff</td>
+ <td>subject</td>
</tr><tr>
<td>body</td>
<td>string</td>
- <td> der Email Body</td>
+ <td>mail body</td>
</tr><tr>
<td>recipients</td>
<td>list</td>
- <td> eine Liste von Emailadressen</td>
+ <td>a list of email addresses</td>
</tr><tr>
<td>frm</td>
<td>string</td>
- <td> Die Absender Emailadresse</td>
+ <td>sender mail address</td>
</tr><tr>
- <td>provider</td>
+ <td>route</td>
+ <td>string|list</td>
+ <td>route to use to send, or a list of routes as fallback</td>
+ </tr><tr>
+ <td>info</td>
<td>string</td>
- <td> Provider über den geschickt werden soll</td>
+ <td>a name, to combine different jobs to one billing group</td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ <h5>Return</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>id</td>
- <td>hash</td>
- <td> Die ID des Auftrages</td>
+ <td>return</td>
+ <td>integer</td>
+ <td>the job id</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-status">
- <h4>Status</h4>
- <p><code>status(id=None, detailed=False)</code></p>
- <p>Gibt den aktuellen Status eines Auftrages zurück.</p>
+ </div><div class="item" id="method-routes">
+ <h4>Routes</h4>
+ <p><code>routes(user, typ=None)</code></p>
+ <p>Returns a list of all possible offernames.</p>
<h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>id</td>
- <td>hash</td>
- <td> Eine Auftragsnummer</td>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
</tr><tr>
- <td>detailed</td>
- <td>boolean</td>
- <td> Details ausgeben</td>
+ <td>typ</td>
+ <td>string</td>
+ <td>a typ of message -- one of in this list ["sms","fax","mail"]</td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ <h5>Return</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>return</td>
+ <td>list</td>
+ <td>a list of all possible offer names for a typ</td>
+ </tr>
+ </tbody>
+ </table>
+ </div><div class="item" id="method-defaultRoute">
+ <h4>DefaultRoute</h4>
+ <p><code>defaultRoute(user, typ=None)</code></p>
+ <p>Returns all default offernames.</p>
+ <h5>Parameter</h5>
+ <table class="docs">
+ <thead>
+ <tr>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>jobs</td>
- <td>list</td>
- <td> Eine Liste der Aufträge.</td>
- </tr><tr>
- <td>job.name</td>
+ <td>user</td>
<td>string</td>
- <td> Angebener Name</td>
+ <td>apikey of a user</td>
</tr><tr>
- <td>job.status</td>
+ <td>typ</td>
<td>string</td>
- <td> Status des Auftrages</td>
+ <td>a typ of message -- one of in this list ["sms","fax","mail"]</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-stop">
- <h4>Stop</h4>
- <p><code>stop(id)</code></p>
- <p>Stoppt den angegeben Auftrag.</p>
+ <h5>Return</h5>
+ <table class="docs">
+ <thead>
+ <tr>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>return</td>
+ <td>list</td>
+ <td>a list of all possible offer names for a typ</td>
+ </tr>
+ </tbody>
+ </table>
+ </div><div class="item" id="method-bill">
+ <h4>Bill</h4>
+ <p><code>bill(user=None)</code></p>
+ <p>Returns the bill, of not paid messages.</p>
<h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>id</td>
- <td>hash</td>
- <td> Eine Auftragsnummer</td>
+ <td>user</td>
+ <td>string</td>
+ <td>apikey of a user</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-getProvider">
- <h4>GetProvider</h4>
- <p><code>getProvider(typ)</code></p>
- <p>Gibt eine Liste aller verfügbaren Provider zurück.</p>
- <h5>Parameter</h5>
+ <h5>Return</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>typ</td>
- <td>string</td>
- <td> Der Typ zu dem die Providerloste ausgeben werden soll
-Einer der Liste ["sms","fax","mail"]</td>
+ <td>return</td>
+ <td>dict</td>
+ <td><ul class="simple">
+<li><cite>route</cite> -- one offer name ; <strong>"total"</strong> complete sum</li>
+<li>[<cite>route</cite>][<cite>info</cite>][<strong>anz</strong>] -- Number of sended messages in one billing group</li>
+<li>[<cite>route</cite>][<cite>info</cite>][<strong>price</strong>] -- Price for one billing group</li>
+<li>[<cite>route</cite> | <strong>total</strong>][<strong>anz</strong>] -- Number of sended messages for one offer</li>
+<li>[<cite>route</cite> | <strong>total</strong>][<strong>price</strong>] -- Price for one offer</li>
+</ul></td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ </div><div class="item" id="method-telnumber">
+ <h4>Telnumber</h4>
+ <p><code>telnumber(recipients)</code></p>
+ <p>Return True, if all telnumbers a vaild.</p>
+ <h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>providerlist</td>
+ <td>recipients</td>
<td>list</td>
- <td> Eine Liste aller möglichen Provider</td>
+ <td>a list of telnumbers (use ITU-T E.123)</td>
</tr>
</tbody>
</table>
- </div><div class="item" id="method-getDefaultProvider">
- <h4>GetDefaultProvider</h4>
- <p><code>getDefaultProvider(typ)</code></p>
- <p>Gibt den Standardprovider zurück.</p>
- <h5>Parameter</h5>
+ <h5>Return</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>typ</td>
- <td>string</td>
- <td> Der Typ zu dem die Providerloste ausgeben werden soll
-Einer der Liste ["sms","fax","mail"]</td>
+ <td>return</td>
+ <td>boolean</td>
+ <td>True -- all numbers are valid</td>
</tr>
</tbody>
</table>
- <h5>Ausgabe</h5>
+ </div><div class="item" id="method-email">
+ <h4>Email</h4>
+ <p><code>email(recipients)</code></p>
+ <p>Return True, if all mailadresses a valid.</p>
+ <h5>Parameter</h5>
<table class="docs">
<thead>
<tr>
- <td>Parameter</td>
- <td>Typ</td>
- <td>Beschreibung</td>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
</tr>
</thead>
<tbody>
<tr>
- <td>provider</td>
- <td>string</td>
- <td> Der Standardprovider für den angeben Typ</td>
+ <td>recipients</td>
+ <td>list</td>
+ <td>a list of mailadresses</td>
+ </tr>
+ </tbody>
+ </table>
+ <h5>Return</h5>
+ <table class="docs">
+ <thead>
+ <tr>
+ <td>parameter</td>
+ <td>type</td>
+ <td>description</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>return</td>
+ <td>boolean</td>
+ <td>True -- all addresses are valid</td>
</tr>
</tbody>
</table>