doc/current.html
branchdevel
changeset 277 f65edc0382cc
parent 276 4841b443f1fd
child 278 4d376a97e663
child 279 d32fa77ce318
equal deleted inserted replaced
276:4841b443f1fd 277:f65edc0382cc
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
       
     2 <html>
       
     3 	
       
     4 
       
     5 	<head>
       
     6 		<title>Iro ·  api docs current</title>
       
     7 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
       
     8 		<meta charset="utf-8">
       
     9 		<meta name="description" content="">
       
    10 		<meta name="keywords" content="">
       
    11 		<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
       
    12 		<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen">
       
    13 		<link rel="stylesheet" href="css/960.css" type="text/css" media="screen">
       
    14 		<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
       
    15 		<!--[if IE]><link rel="stylesheet" href="css/style-ie.css" type="text/css"  media="screen" /><![endif] -->
       
    16 	</head>
       
    17 	<body>
       
    18 	<div id="head-container">
       
    19 		<div id="head">
       
    20 			<h1 id="logo"><a href="index.html" class="logo" title="Netzguerilla"><span>Netzguerilla</span></a></h1>
       
    21 			<ul id="menu">
       
    22 				<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>
       
    23 			</ul>
       
    24 		</div>
       
    25 	</div>
       
    26 	<div id="content-container">
       
    27 		<div id="content" class="container_12">
       
    28 			<div id="main" class="grid_9">
       
    29 				<h2>API Documentation</h2>
       
    30 				<div class="item">
       
    31 			<p>
       
    32 			</p>
       
    33 			<ol>
       
    34 				<li value="1">1. <a href="#api-intro">Intro</a></li>
       
    35 				<li value="2">2.
       
    36 				<a href="#api-interfaces">Interfaces</a>
       
    37 				<ol>
       
    38 					<li value="2.1">2.1 <a href="#interface-xmlrpc">XML-RPC</a></li>
       
    39 					<li value="2.1">2.2 <a href="#interface-soap">SOAP</a></li>
       
    40 					<li value="2.3">2.3 <a href="#interface-json">JSON</a></li>
       
    41 					<li value="2.4">2.4 <a href="#interface-jsonp">JSONP</a></li>
       
    42 				</ol>
       
    43 				</li>
       
    44 				<li value="3">3.
       
    45 					<a href="#api-methods">Methods</a>
       
    46 					<ol>
       
    47 						<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>
       
    48 					</ol>
       
    49 				</li>
       
    50 			</ol>
       
    51 		</div><div class="item" id="api-intro">
       
    52 			<h3>Intro</h3>
       
    53 			<p>
       
    54 				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.
       
    55 			</p>
       
    56 		</div><div class="item" id="api-interfaces">
       
    57 			<h3>Interfaces</h3>
       
    58 			<p>
       
    59 				You can use diffrent interfaces to get to same result.
       
    60 			</p>
       
    61 			<div class="item" id="interface-xmlrpc">
       
    62 				<h4>XML-RPC</h4>
       
    63 				<p>
       
    64 					Interface-URI: <code>http://localhost:8000/xmlrpc</code>
       
    65 				</p>
       
    66 			</div>
       
    67 			<div class="item" id="interface-soap">
       
    68 				<h4>SOAP</h4>
       
    69 				<p>
       
    70 					Interface-URI: <code>http://localhost:8000/soap</code>
       
    71 				</p>
       
    72 			</div>
       
    73 			<div class="item" id="interface-json">
       
    74 				<h4>JSON</h4>
       
    75 				<p>
       
    76 					Interface-URI: <code>http://localhost:8000/json/<em>&lt;methode&gt;</em></code>
       
    77 				</p>
       
    78 				<p>
       
    79 					Not yet implementet
       
    80 				</p>
       
    81 			</div>
       
    82 			<div class="item" id="interface-jsonp">
       
    83 				<h4>JSONP</h4>
       
    84 				<p>
       
    85 					Interface-URI: <code>http://localhost:8000/jsonp/<em>&lt;methode&gt;</em>?callback=&lt;callback&gt;</code>
       
    86 				</p>
       
    87 				<p>
       
    88 					Not yet implementet
       
    89 				</p>
       
    90 			</div>
       
    91 		</div><div class="item" id="api-methods">
       
    92 			<h3>Methods</h3>
       
    93 			<div class="item" id="method-status">
       
    94 				<h4>Status</h4>
       
    95 				<p><code>status(user=None, id=False, detailed=None)</code></p>
       
    96 				<p>Returns the status of one or more jobs.</p>
       
    97 				<h5>Parameter</h5>
       
    98 				<table class="docs">
       
    99 					<thead>
       
   100 						<tr>
       
   101 							<td>parameter</td>
       
   102 							<td>type</td>
       
   103 							<td>description</td>
       
   104 						</tr>
       
   105 					</thead>
       
   106 					<tbody>
       
   107 						<tr>
       
   108 							<td>user</td>
       
   109 							<td>string</td>
       
   110 							<td>apikey of a user</td>
       
   111 						</tr><tr>
       
   112 							<td>id</td>
       
   113 							<td>integer</td>
       
   114 							<td>one job id</td>
       
   115 						</tr><tr>
       
   116 							<td>detailed</td>
       
   117 							<td>boolean</td>
       
   118 							<td>return more details about the status</td>
       
   119 						</tr>
       
   120 					</tbody>
       
   121 				</table>
       
   122 				<h5>Return</h5>
       
   123 				<table class="docs">
       
   124 					<thead>
       
   125 						<tr>
       
   126 							<td>parameter</td>
       
   127 							<td>type</td>
       
   128 							<td>description</td>
       
   129 						</tr>
       
   130 					</thead>
       
   131 					<tbody>
       
   132 						<tr>
       
   133 							<td>return</td>
       
   134 							<td>dict</td>
       
   135 							<td><ul class="simple">
       
   136 <li><cite>key</cite> -- is the job id</li>
       
   137 <li>[<cite>key</cite>][<strong>'status'</strong>] -- status of the job</li>
       
   138 </ul></td>
       
   139 						</tr>
       
   140 					</tbody>
       
   141 				</table>
       
   142 			</div><div class="item" id="method-sms">
       
   143 				<h4>Sms</h4>
       
   144 				<p><code>sms(user, message, recipients, route='default', info='')</code></p>
       
   145 				<p>Send a sms.</p>
       
   146 				<h5>Parameter</h5>
       
   147 				<table class="docs">
       
   148 					<thead>
       
   149 						<tr>
       
   150 							<td>parameter</td>
       
   151 							<td>type</td>
       
   152 							<td>description</td>
       
   153 						</tr>
       
   154 					</thead>
       
   155 					<tbody>
       
   156 						<tr>
       
   157 							<td>user</td>
       
   158 							<td>string</td>
       
   159 							<td>apikey of a user</td>
       
   160 						</tr><tr>
       
   161 							<td>message</td>
       
   162 							<td>string</td>
       
   163 							<td>message</td>
       
   164 						</tr><tr>
       
   165 							<td>recipients</td>
       
   166 							<td>list</td>
       
   167 							<td>a list of telefon numbers (use ITU-T E.123)</td>
       
   168 						</tr><tr>
       
   169 							<td>route</td>
       
   170 							<td>string|list</td>
       
   171 							<td>route to use to send, or a list of routes as fallback</td>
       
   172 						</tr><tr>
       
   173 							<td>info</td>
       
   174 							<td>string</td>
       
   175 							<td>a name, to combine different jobs to one billing group</td>
       
   176 						</tr>
       
   177 					</tbody>
       
   178 				</table>
       
   179 				<h5>Return</h5>
       
   180 				<table class="docs">
       
   181 					<thead>
       
   182 						<tr>
       
   183 							<td>parameter</td>
       
   184 							<td>type</td>
       
   185 							<td>description</td>
       
   186 						</tr>
       
   187 					</thead>
       
   188 					<tbody>
       
   189 						<tr>
       
   190 							<td>return</td>
       
   191 							<td>integer</td>
       
   192 							<td>the job id</td>
       
   193 						</tr>
       
   194 					</tbody>
       
   195 				</table>
       
   196 			</div><div class="item" id="method-fax">
       
   197 				<h4>Fax</h4>
       
   198 				<p><code>fax(user, subject, fax, recipients, route='default', info='')</code></p>
       
   199 				<p>Send a fax.</p>
       
   200 				<h5>Parameter</h5>
       
   201 				<table class="docs">
       
   202 					<thead>
       
   203 						<tr>
       
   204 							<td>parameter</td>
       
   205 							<td>type</td>
       
   206 							<td>description</td>
       
   207 						</tr>
       
   208 					</thead>
       
   209 					<tbody>
       
   210 						<tr>
       
   211 							<td>user</td>
       
   212 							<td>string</td>
       
   213 							<td>apikey of a user</td>
       
   214 						</tr><tr>
       
   215 							<td>subject</td>
       
   216 							<td>string</td>
       
   217 							<td>subject</td>
       
   218 						</tr><tr>
       
   219 							<td>fax</td>
       
   220 							<td>string</td>
       
   221 							<td>content (base64 encoded)</td>
       
   222 						</tr><tr>
       
   223 							<td>recipients</td>
       
   224 							<td>list</td>
       
   225 							<td>a list of telefon numbers (use ITU-T E.123)</td>
       
   226 						</tr><tr>
       
   227 							<td>route</td>
       
   228 							<td>string|list</td>
       
   229 							<td>route to use to send, or a list of routes as fallback</td>
       
   230 						</tr><tr>
       
   231 							<td>info</td>
       
   232 							<td>string</td>
       
   233 							<td>a name, to combine different jobs to one billing group</td>
       
   234 						</tr>
       
   235 					</tbody>
       
   236 				</table>
       
   237 				<h5>Return</h5>
       
   238 				<table class="docs">
       
   239 					<thead>
       
   240 						<tr>
       
   241 							<td>parameter</td>
       
   242 							<td>type</td>
       
   243 							<td>description</td>
       
   244 						</tr>
       
   245 					</thead>
       
   246 					<tbody>
       
   247 						<tr>
       
   248 							<td>return</td>
       
   249 							<td>integer</td>
       
   250 							<td>the job id</td>
       
   251 						</tr>
       
   252 					</tbody>
       
   253 				</table>
       
   254 			</div><div class="item" id="method-mail">
       
   255 				<h4>Mail</h4>
       
   256 				<p><code>mail(user, subject, body, recipients, frm=None, route='default', info='')</code></p>
       
   257 				<p>Send a mail.</p>
       
   258 				<h5>Parameter</h5>
       
   259 				<table class="docs">
       
   260 					<thead>
       
   261 						<tr>
       
   262 							<td>parameter</td>
       
   263 							<td>type</td>
       
   264 							<td>description</td>
       
   265 						</tr>
       
   266 					</thead>
       
   267 					<tbody>
       
   268 						<tr>
       
   269 							<td>user</td>
       
   270 							<td>string</td>
       
   271 							<td>apikey of a user</td>
       
   272 						</tr><tr>
       
   273 							<td>subject</td>
       
   274 							<td>string</td>
       
   275 							<td>subject</td>
       
   276 						</tr><tr>
       
   277 							<td>body</td>
       
   278 							<td>string</td>
       
   279 							<td>mail body</td>
       
   280 						</tr><tr>
       
   281 							<td>recipients</td>
       
   282 							<td>list</td>
       
   283 							<td>a list of email addresses</td>
       
   284 						</tr><tr>
       
   285 							<td>frm</td>
       
   286 							<td>string</td>
       
   287 							<td>sender mail address</td>
       
   288 						</tr><tr>
       
   289 							<td>route</td>
       
   290 							<td>string|list</td>
       
   291 							<td>route to use to send, or a list of routes as fallback</td>
       
   292 						</tr><tr>
       
   293 							<td>info</td>
       
   294 							<td>string</td>
       
   295 							<td>a name, to combine different jobs to one billing group</td>
       
   296 						</tr>
       
   297 					</tbody>
       
   298 				</table>
       
   299 				<h5>Return</h5>
       
   300 				<table class="docs">
       
   301 					<thead>
       
   302 						<tr>
       
   303 							<td>parameter</td>
       
   304 							<td>type</td>
       
   305 							<td>description</td>
       
   306 						</tr>
       
   307 					</thead>
       
   308 					<tbody>
       
   309 						<tr>
       
   310 							<td>return</td>
       
   311 							<td>integer</td>
       
   312 							<td>the job id</td>
       
   313 						</tr>
       
   314 					</tbody>
       
   315 				</table>
       
   316 			</div><div class="item" id="method-routes">
       
   317 				<h4>Routes</h4>
       
   318 				<p><code>routes(user, typ=None)</code></p>
       
   319 				<p>Returns a list of all possible offernames.</p>
       
   320 				<h5>Parameter</h5>
       
   321 				<table class="docs">
       
   322 					<thead>
       
   323 						<tr>
       
   324 							<td>parameter</td>
       
   325 							<td>type</td>
       
   326 							<td>description</td>
       
   327 						</tr>
       
   328 					</thead>
       
   329 					<tbody>
       
   330 						<tr>
       
   331 							<td>user</td>
       
   332 							<td>string</td>
       
   333 							<td>apikey of a user</td>
       
   334 						</tr><tr>
       
   335 							<td>typ</td>
       
   336 							<td>string</td>
       
   337 							<td>a typ of message -- one of in this list [&quot;sms&quot;,&quot;fax&quot;,&quot;mail&quot;]</td>
       
   338 						</tr>
       
   339 					</tbody>
       
   340 				</table>
       
   341 				<h5>Return</h5>
       
   342 				<table class="docs">
       
   343 					<thead>
       
   344 						<tr>
       
   345 							<td>parameter</td>
       
   346 							<td>type</td>
       
   347 							<td>description</td>
       
   348 						</tr>
       
   349 					</thead>
       
   350 					<tbody>
       
   351 						<tr>
       
   352 							<td>return</td>
       
   353 							<td>list</td>
       
   354 							<td>a list of all possible offer names for a typ</td>
       
   355 						</tr>
       
   356 					</tbody>
       
   357 				</table>
       
   358 			</div><div class="item" id="method-defaultRoute">
       
   359 				<h4>DefaultRoute</h4>
       
   360 				<p><code>defaultRoute(user, typ=None)</code></p>
       
   361 				<p>Returns all default offernames.</p>
       
   362 				<h5>Parameter</h5>
       
   363 				<table class="docs">
       
   364 					<thead>
       
   365 						<tr>
       
   366 							<td>parameter</td>
       
   367 							<td>type</td>
       
   368 							<td>description</td>
       
   369 						</tr>
       
   370 					</thead>
       
   371 					<tbody>
       
   372 						<tr>
       
   373 							<td>user</td>
       
   374 							<td>string</td>
       
   375 							<td>apikey of a user</td>
       
   376 						</tr><tr>
       
   377 							<td>typ</td>
       
   378 							<td>string</td>
       
   379 							<td>a typ of message -- one of in this list [&quot;sms&quot;,&quot;fax&quot;,&quot;mail&quot;]</td>
       
   380 						</tr>
       
   381 					</tbody>
       
   382 				</table>
       
   383 				<h5>Return</h5>
       
   384 				<table class="docs">
       
   385 					<thead>
       
   386 						<tr>
       
   387 							<td>parameter</td>
       
   388 							<td>type</td>
       
   389 							<td>description</td>
       
   390 						</tr>
       
   391 					</thead>
       
   392 					<tbody>
       
   393 						<tr>
       
   394 							<td>return</td>
       
   395 							<td>list</td>
       
   396 							<td>a list of all possible offer names for a typ</td>
       
   397 						</tr>
       
   398 					</tbody>
       
   399 				</table>
       
   400 			</div><div class="item" id="method-bill">
       
   401 				<h4>Bill</h4>
       
   402 				<p><code>bill(user=None)</code></p>
       
   403 				<p>Returns the bill, of not paid messages.</p>
       
   404 				<h5>Parameter</h5>
       
   405 				<table class="docs">
       
   406 					<thead>
       
   407 						<tr>
       
   408 							<td>parameter</td>
       
   409 							<td>type</td>
       
   410 							<td>description</td>
       
   411 						</tr>
       
   412 					</thead>
       
   413 					<tbody>
       
   414 						<tr>
       
   415 							<td>user</td>
       
   416 							<td>string</td>
       
   417 							<td>apikey of a user</td>
       
   418 						</tr>
       
   419 					</tbody>
       
   420 				</table>
       
   421 				<h5>Return</h5>
       
   422 				<table class="docs">
       
   423 					<thead>
       
   424 						<tr>
       
   425 							<td>parameter</td>
       
   426 							<td>type</td>
       
   427 							<td>description</td>
       
   428 						</tr>
       
   429 					</thead>
       
   430 					<tbody>
       
   431 						<tr>
       
   432 							<td>return</td>
       
   433 							<td>dict</td>
       
   434 							<td><ul class="simple">
       
   435 <li><cite>route</cite> -- one offer name ; <strong>&quot;total&quot;</strong> complete sum</li>
       
   436 <li>[<cite>route</cite>][<cite>info</cite>][<strong>anz</strong>] -- Number of sended messages in one billing group</li>
       
   437 <li>[<cite>route</cite>][<cite>info</cite>][<strong>price</strong>] -- Price for one billing group</li>
       
   438 <li>[<cite>route</cite> | <strong>total</strong>][<strong>anz</strong>] -- Number of sended messages for one offer</li>
       
   439 <li>[<cite>route</cite> | <strong>total</strong>][<strong>price</strong>] -- Price for one offer</li>
       
   440 </ul></td>
       
   441 						</tr>
       
   442 					</tbody>
       
   443 				</table>
       
   444 			</div><div class="item" id="method-telnumber">
       
   445 				<h4>Telnumber</h4>
       
   446 				<p><code>telnumber(recipients)</code></p>
       
   447 				<p>Return True, if all telnumbers a vaild.</p>
       
   448 				<h5>Parameter</h5>
       
   449 				<table class="docs">
       
   450 					<thead>
       
   451 						<tr>
       
   452 							<td>parameter</td>
       
   453 							<td>type</td>
       
   454 							<td>description</td>
       
   455 						</tr>
       
   456 					</thead>
       
   457 					<tbody>
       
   458 						<tr>
       
   459 							<td>recipients</td>
       
   460 							<td>list</td>
       
   461 							<td>a list of telnumbers (use ITU-T E.123)</td>
       
   462 						</tr>
       
   463 					</tbody>
       
   464 				</table>
       
   465 				<h5>Return</h5>
       
   466 				<table class="docs">
       
   467 					<thead>
       
   468 						<tr>
       
   469 							<td>parameter</td>
       
   470 							<td>type</td>
       
   471 							<td>description</td>
       
   472 						</tr>
       
   473 					</thead>
       
   474 					<tbody>
       
   475 						<tr>
       
   476 							<td>return</td>
       
   477 							<td>boolean</td>
       
   478 							<td>True -- all numbers are valid</td>
       
   479 						</tr>
       
   480 					</tbody>
       
   481 				</table>
       
   482 			</div><div class="item" id="method-email">
       
   483 				<h4>Email</h4>
       
   484 				<p><code>email(recipients)</code></p>
       
   485 				<p>Return True, if all mailadresses a valid.</p>
       
   486 				<h5>Parameter</h5>
       
   487 				<table class="docs">
       
   488 					<thead>
       
   489 						<tr>
       
   490 							<td>parameter</td>
       
   491 							<td>type</td>
       
   492 							<td>description</td>
       
   493 						</tr>
       
   494 					</thead>
       
   495 					<tbody>
       
   496 						<tr>
       
   497 							<td>recipients</td>
       
   498 							<td>list</td>
       
   499 							<td>a list of mailadresses</td>
       
   500 						</tr>
       
   501 					</tbody>
       
   502 				</table>
       
   503 				<h5>Return</h5>
       
   504 				<table class="docs">
       
   505 					<thead>
       
   506 						<tr>
       
   507 							<td>parameter</td>
       
   508 							<td>type</td>
       
   509 							<td>description</td>
       
   510 						</tr>
       
   511 					</thead>
       
   512 					<tbody>
       
   513 						<tr>
       
   514 							<td>return</td>
       
   515 							<td>boolean</td>
       
   516 							<td>True -- all addresses are valid</td>
       
   517 						</tr>
       
   518 					</tbody>
       
   519 				</table>
       
   520 			</div>
       
   521 		</div>
       
   522 			</div>
       
   523 			<div class="clear"></div>
       
   524 		</div>
       
   525 	</div>
       
   526 	<div id="foot-container">
       
   527 		<div id="foot">
       
   528 			<p>© 2010-2011 <a href="impressum.html">Netzguerilla.net</a>.</p>
       
   529 		</div>
       
   530 	</div>
       
   531 	</body>
       
   532 </html>