# HG changeset patch # User Sandro Knauß # Date 1323197160 -3600 # Node ID e7b44716a564e45aee561856006b02ccf438d4b1 # Parent 0f3063b5e96ba449ecd416077cd67937af783a0b adding documentation diff -r 0f3063b5e96b -r e7b44716a564 createdoc.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/createdoc.py Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,128 @@ +#!/usr/bin/env python2.7 +# -*- coding: utf-8 -*- + +from genshi.template import TemplateLoader + +loader = TemplateLoader('doc/tmpl', auto_reload=True) + +import re +import inspect +from iro.user import User + + +user_methods = dict(inspect.getmembers(User(None,None))) + +class Link(): + def __init__(self,name,title): + self.name=name + self.title=title + + def getLink(self): + return self.name + + def __getitem__(self,name): + if name == "link": + return self.getLink() + return AttributeError(name) + +class Site(Link): + pass + + +class Keyword(): + def __init__(self,name,typ,description): + self.name=name + self.typ=typ + self.description=description + +def section(text): + ret={} + li=[] + kw=None + for line in text.split("\n"): + if re.match("^\s*$",line): + continue + + if line[0] not in (" ","\t"): + if kw: + ret[kw.name]=kw + li.append(kw) + l=re.match(r"^(?P[a-zA-Z0-9-_.]*)\[(?P[a-zA-Z0-9-_]*)\]:(?P.*)$",line) + kw=Keyword(name=l.group("name"),typ=l.group("typ"),description=l.group("d")) + else: + kw.description+="\n"+line.strip() + if kw: + ret[kw.name]=kw + li.append(kw) + return ret,li + + + +def keywords(f): + doc=f.__doc__ + kwds=re.search("Keywords:\n(?P(?P\s*)(.+\n)*)\n",doc) + k=kwds.group("keywords") + #get rid of beginning whitespaces + k=re.sub(re.compile(r"^"+kwds.group("whitespace"),re.M),"",k) + return section(k) + +def ret(f): + doc=f.__doc__ + kwds=re.search("Return:\n(?P(?P\s*)(.+\n)*)\n",doc) + k=kwds.group("ret") + #get rid of beginning whitespaces + k=re.sub(re.compile(r"^"+kwds.group("whitespace"),re.M),"",k) + return section(k) + + + +class Arg(): + def __init__(self,name,f): + self.name=name + k,_ = keywords(f) + kwd=k[name] + self.typ=kwd.typ + self.description=kwd.description + + + +class Method(Link): + def __init__(self,name,title): + Link.__init__(self,name,title) + m=user_methods[name] + self.description = m.__doc__.split("\n")[0] + a=inspect.getargspec(m) + self.args=[Arg(a,m) for a in a.args if a is not "self"] + _, self.rets=ret(m) + + +def main(): + sites=[Site("index.html","Iro"), + Site("current.html","API Documentation"), + Site("new.html","geplante API Documentation"), + Site("impressum.html","Impressum"), + ] + + methods=[ + Method("startSMS","StartSMS"), + Method("startFAX","StartFAX"), + Method("startMail","StartMail"), + + Method("status","Status"), + Method("stop","Stop"), + + Method("getProvider","GetProvider"), + Method("getDefaultProvider","GetDefaultProvider"), + ] + for site in sites: + print("generiere %s" % site.name) + tmpl = loader.load(site.name) + def a(s): + if s == site: + return {"class":"menu active"} + stream = tmpl.generate(sites=sites,active=a,methods=methods) + with open('doc/'+site.name, "w") as g: + g.write(stream.render('html', doctype='html')) + +if __name__ == '__main__': + main() diff -r 0f3063b5e96b -r e7b44716a564 doc/css/960.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/css/960.css Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,1 @@ +.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px}.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.container_12 .grid_9,.container_16 .grid_12{width:700px}.container_12 .grid_12,.container_16 .grid_16{width:940px}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_16 .grid_1{width:40px}.container_16 .grid_2{width:100px}.container_16 .grid_3{width:160px}.container_16 .grid_5{width:280px}.container_16 .grid_6{width:340px}.container_16 .grid_7{width:400px}.container_16 .grid_9{width:520px}.container_16 .grid_10{width:580px}.container_16 .grid_11{width:640px}.container_16 .grid_13{width:760px}.container_16 .grid_14{width:820px}.container_16 .grid_15{width:880px}.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px}.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px}.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_16 .prefix_1{padding-left:60px}.container_16 .prefix_2{padding-left:120px}.container_16 .prefix_3{padding-left:180px}.container_16 .prefix_5{padding-left:300px}.container_16 .prefix_6{padding-left:360px}.container_16 .prefix_7{padding-left:420px}.container_16 .prefix_9{padding-left:540px}.container_16 .prefix_10{padding-left:600px}.container_16 .prefix_11{padding-left:660px}.container_16 .prefix_13{padding-left:780px}.container_16 .prefix_14{padding-left:840px}.container_16 .prefix_15{padding-left:900px}.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px}.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px}.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_16 .suffix_1{padding-right:60px}.container_16 .suffix_2{padding-right:120px}.container_16 .suffix_3{padding-right:180px}.container_16 .suffix_5{padding-right:300px}.container_16 .suffix_6{padding-right:360px}.container_16 .suffix_7{padding-right:420px}.container_16 .suffix_9{padding-right:540px}.container_16 .suffix_10{padding-right:600px}.container_16 .suffix_11{padding-right:660px}.container_16 .suffix_13{padding-right:780px}.container_16 .suffix_14{padding-right:840px}.container_16 .suffix_15{padding-right:900px}.container_12 .push_3,.container_16 .push_4{left:240px}.container_12 .push_6,.container_16 .push_8{left:480px}.container_12 .push_9,.container_16 .push_12{left:720px}.container_12 .push_1{left:80px}.container_12 .push_2{left:160px}.container_12 .push_4{left:320px}.container_12 .push_5{left:400px}.container_12 .push_7{left:560px}.container_12 .push_8{left:640px}.container_12 .push_10{left:800px}.container_12 .push_11{left:880px}.container_16 .push_1{left:60px}.container_16 .push_2{left:120px}.container_16 .push_3{left:180px}.container_16 .push_5{left:300px}.container_16 .push_6{left:360px}.container_16 .push_7{left:420px}.container_16 .push_9{left:540px}.container_16 .push_10{left:600px}.container_16 .push_11{left:660px}.container_16 .push_13{left:780px}.container_16 .push_14{left:840px}.container_16 .push_15{left:900px}.container_12 .pull_3,.container_16 .pull_4{left:-240px}.container_12 .pull_6,.container_16 .pull_8{left:-480px}.container_12 .pull_9,.container_16 .pull_12{left:-720px}.container_12 .pull_1{left:-80px}.container_12 .pull_2{left:-160px}.container_12 .pull_4{left:-320px}.container_12 .pull_5{left:-400px}.container_12 .pull_7{left:-560px}.container_12 .pull_8{left:-640px}.container_12 .pull_10{left:-800px}.container_12 .pull_11{left:-880px}.container_16 .pull_1{left:-60px}.container_16 .pull_2{left:-120px}.container_16 .pull_3{left:-180px}.container_16 .pull_5{left:-300px}.container_16 .pull_6{left:-360px}.container_16 .pull_7{left:-420px}.container_16 .pull_9{left:-540px}.container_16 .pull_10{left:-600px}.container_16 .pull_11{left:-660px}.container_16 .pull_13{left:-780px}.container_16 .pull_14{left:-840px}.container_16 .pull_15{left:-900px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}* html .clearfix,*:first-child+html .clearfix{zoom:1} \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/css/reset.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/css/reset.css Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0} \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/css/style-ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/css/style-ie.css Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,15 @@ +#head #menu { + + width: 750px; + +} + + #head #menu li { + + display: inline; + position: relative; + float: left; + margin: 0px; + padding: 0px; + + } \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/css/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/css/style.css Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,975 @@ + +body { + + background-color: #eee; + color: #111; + margin: 0px; + padding: 0px; + font-family: "DroidSans", "Trebuchet MS", sans-serif; + line-height: 1.6em; + font-size: 1.3em; + +} + + #head-container { + + display: block; + position: relative; + width: 100%; + height: 90px; + + background: #111 url(../images/head.png) top left repeat-x; + + } + + #head { + + display: block; + position: relative; + width: 960px; + height: 90px; + margin: 0px auto; + + } + + #head #logo { + + display: block; + position: absolute; + left: 0px; + bottom: 10px; + width: 200px; + height: 70px; + + } + + #head #logo a { + + display: block; + position: relative; + width: 200px; + padding-left: 70px; + height: 70px; + background: url(../images/netzguerilla-3.png) 0px 0px no-repeat; + text-decoration: none; + + } + + #head #logo a span { + + display: none; + + } + + #head #menu { + + display: block; + position: absolute; + right: 0px; + bottom: 0px; + margin: 0px; + padding: 0px; + + } + + #head #menu li { + + display: inline-block; + position: relative; + margin: 0px; + padding: 0px; + + } + + #head #menu li a { + + display: block; + position: relative; + + color: #c03; + text-decoration: none; + text-transform: uppercase; + padding: 0px 7px; + background: #333 url(../images/fade-top.png) bottom left repeat-x; + margin-left: 5px; + font-size: .8em; + font-weight: bold; + + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + + } + + #head #menu li a:hover { + + background: #c03 url(../images/fade-top.png) bottom left repeat-x; + color: #fff; + + } + + #head #menu li a.active { + + background-color: #eee; + background-image: none; + color: #000; + + } + + #content-container { + + display: block; + position: relative; + + } + #content { + + padding: 20px 0px; + + } + + #main {} + + #main h2 { + + display: block; + position: relative; + color: #a01; + font-size: 1.8em; + line-height: 1.4em; + margin-bottom: 15px; + text-shadow: 0px 0px 5px #fff; + + } + + #main h3 { + + display: block; + position: relative; + color: #b02; + font-size: 1.4em; + line-height: 1.4em; + margin: 10px 0px; + + } + + #main h4 { + + display: block; + position: relative; + color: #a01; + font-size: 1.3em; + line-height: 1.4em; + margin: 10px 0px; + + } + + #main h5 { + + display: block; + position: relative; + color: #900; + font-size: 1.2em; + line-height: 1.4em; + margin: 10px 0px; + + } + + #main .item { + + display: block; + position: relative; + + padding: 30px 40px; + + border-radius: 15px; + -o-border-radius: 15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + + -moz-box-shadow: 0px 0px 20px #eee; + -o-box-shadow: 0px 0px 20px #eee; + -webkit-box-shadow: 0px 0px 20px #eee; + box-shadow: 0px 0px 20px #eee; + + background-color: #fff; + margin-bottom: 20px; + font-size: .9em; + + } + + #main .item p { + + margin: 5px 0px; + + } + + #main .item a { + + text-decoration: none; + color: #b02; + + } + + #main .item ol { + + list-style-type: none; + list-style-position: inside; + + } + + #main .item ol li { + + margin-left: 2em; + + } + + #main .item table { + + width: 100%; + margin: 0px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + + -moz-box-shadow: 0px 0px 15px #ccc; + -o-box-shadow: 0px 0px 15px #ccc; + -webkit-box-shadow: 0px 0px 15px #ccc; + box-shadow: 0px 0px 15px #ccc; + + + } + + #main .item table.docs { + + font-size: .8em; + + } + + #main .item table.docs td { + + font-weight: bold; + padding-right: 0.2em; + min-width: 120px; + + } + + #main .item table.docs td+td { + + font-weight: normal; + padding-right: 0.2em; + min-width: 80px; + + } + + #main .item table.docs td+td+td { + + font-weight: normal; + padding-right: 0em; + white-space: normal; + + } + + #main .item table td { + + background-color: #eee; + line-height: 1.7em; + + } + + #main .item table thead tr td { + + background-color: #c03; + color: #fff; + font-size: .8em; + padding: 5px; + + } + + #main .item table tbody tr td { + + color: #222; + vertical-align: top; + + } + + #main .item table tbody tr td.content { + + padding: 10px; + font-size: .8em; + + } + + #main .item table tbody tr td.content strong.title { + + display: inline-block; + position: relative; + max-width: 140px; + overflow: hidden; + + } + + #main .item table tbody tr td.content span.meta { + + display: block; + position: relative; + max-width: 140px; + overflow: hidden; + line-height: 1.4em; + font-size: .8em; + + } + + #main .item table tbody tr td.content span.hate { + + display: block; + position: relative; + line-height: 1.4em; + border: 1px solid #ccc; + padding: 10px; + text-align: justify; + + } + #main .item table tbody tr:nth-child(odd) td { + + background-color: #f9f9f9; + + } + + #main .item table tbody tr:nth-child(even) td { + + background-color: #f6f6f6; + + } + + #main .item table tr td:first-child { + + padding-left: 5px; + + } + + #main .item table tr td:last-child { + + padding-right: 5px; + + } + + #main .item table tr td.controls { + + width: 80px; + text-align: right; + + } + + #main .item table tr td.controls a { + + display: inline-block; + width: 20px; + height: 20px; + overflow: hidden; + text-indent: 30px; + background-color: #eee; + + -moz-box-shadow: 0px 0px 5px #ccc; + -o-box-shadow: 0px 0px 5px #ccc; + -webkit-box-shadow: 0px 0px 5px #ccc; + box-shadow: 0px 0px 5px #ccc; + + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + + vertical-align: bottom; + margin: 0px 0px 4px 2px; + + background-image: url(../images/icons/bug.png); + background-position: center center; + background-repeat: no-repeat; + + } + + #main .item table tr td.controls a:hover { + + background-color: #c03; + + } + + #main .item table tr td.controls a.edit { + + background-image: url(../images/icons/pencil.png); + + } + + #main .item table tr td.controls a.delete { + + background-image: url(../images/icons/bin.png); + + } + + #main .item table tr td.controls a.details { + + background-image: url(../images/icons/zoom.png); + + } + + #main .item table tr td.controls a.accept { + + background-image: url(../images/icons/accept.png); + + } + + /* round corners */ + + #main .item table thead tr:first-child td:first-child { + + -webkit-border-top-left-radius: 5px; + -moz-border-radius-topleft: 5px; + border-top-left-radius: 5px; + + } + + #main .item table thead tr:first-child td:last-child { + + -webkit-border-top-right-radius: 5px; + -moz-border-radius-topright: 5px; + border-top-right-radius: 5px; + + } + + #main .item table tbody tr:last-child td:first-child { + + -webkit-border-bottom-left-radius: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-left-radius: 5px; + + } + + #main .item table tbody tr:last-child td:last-child { + + -webkit-border-bottom-right-radius: 5px; + -moz-border-radius-bottomright: 5px; + border-bottom-right-radius: 5px; + + } + + #main .item code.copyme { + + display: block; + margin: 0px 0px 10px; + padding: 10px; + line-height: 1em; + border: 1px solid #ccc; + background-color: #eee; + + } + + /* main view */ + + #main .hate-pagination { + + display: block; + position: relative; + line-height: 1.2em; + padding: 10px 0px; + + } + + #main .hate-pagination-back { + + display: block; + position: relative; + width: 300px; + text-align: left; + float: left; + + } + + #main .hate-pagination-forward { + + display: block; + position: relative; + width: 300px; + text-align: right; + float: right; + + } + + #main .ad-item { + + display: block; + position: relative; + border-bottom: 1px solid #ccc; + line-height: 1.2em; + padding: 20px 0px; + text-align: center; + + } + + #main .hate-item { + + display: block; + position: relative; + border-bottom: 1px solid #ccc; + line-height: 1.2em; + padding: 10px 0px; + + } + + #main .hate-item .hate-item-icon { + + display: block; + position: relative; + width: 48px; + padding: 5px 0px 5px 10px; + float: left; + + } + + #main .hate-item .hate-item-main { + + display: block; + position: relative; + width: 550px; + float: right; + + } + + #main .hate-item .hate-item-author { + + display: block; + position: relative; + font-size: .8em; + font-weight: bold; + color: #222; + + } + + #main .hate-item .hate-item-author a { + + color: #222; + + } + + #main .hate-item .hate-item-content { + + display: block; + position: relative; + font-size: .8em; + font-weight: normal; + color: #444; + + } + + #main .hate-item .hate-item-meta { + + display: block; + position: relative; + font-size: .6em; + color: #666; + + } + + #main .hate-item .hate-item-meta a { + + color: #666; + + } + + #main .hate-item .hate-item-meta a.facepalm { + + display: inline-block; + padding-left: 20px; + line-height: 16px; + background: url(../images/icons/facepalm.png) top left no-repeat; + + } + + #main .hate-item:hover .hate-item-meta a.facepalm { + + background: url(../images/icons/facepalm-hl.png) top left no-repeat; + + } + + #main .hate-item .hate-item-meta span.godwin { + + display: inline-block; + padding-left: 20px; + line-height: 16px; + background: url(../images/icons/godwinbonus.png) top left no-repeat; + + } + + #main .hate-item:hover { + + background-color: #fce; + + } + + #main .hate-item:hover a { + + color: #c03; + + } + + #main .hate-detail { + + display: block; + position: relative; + border-bottom: 1px solid #ccc; + line-height: 1.2em; + padding: 10px 0px; + + } + + #main .hate-detail .hate-item-icon { + + display: block; + position: relative; + width: 48px; + padding: 5px 0px; + float: left; + + } + + #main .hate-detail .hate-item-main { + + display: block; + position: relative; + + } + + #main .hate-detail .hate-item-author { + + display: block; + position: relative; + font-size: 1.2em; + line-height: 50px; + font-weight: bold; + color: #222; + width: 560px; + float: right; + + } + + #main .hate-detail .hate-item-content { + + display: block; + position: relative; + font-size: 1.2em; + line-height: 1.4em; + font-weight: normal; + color: #444; + padding: 10px 0px; + + } + + #main .hate-detail .hate-item-meta { + + display: block; + position: relative; + font-size: .8em; + color: #666; + + } + + #main .hate-detail .hate-item-meta a { + + color: #666; + + } + + #main .hate-detail .hate-item-meta a.facepalm { + + display: inline-block; + padding-left: 20px; + line-height: 16px; + background: url(../images/icons/facepalm.png) top left no-repeat; + + } + + #main .hate-detail:hover .hate-item-meta a.facepalm { + + background: url(../images/icons/facepalm-hl.png) top left no-repeat; + + } + + #main .hate-detail .hate-item-meta span.godwin { + + display: inline-block; + padding-left: 20px; + line-height: 16px; + background: url(../images/icons/godwinbonus.png) top left no-repeat; + + } + + + /* special stuff */ + + #main span.redacted { + + display: inline-block; + background-color: #333; + color: #c03; + line-height: 1.1em; + padding: 0px 5px; + + } + + #main code.apikey { + + font-size: 1.1em; + background-color: #a01; + color: #fff; + display: inline-block; + padding: 0px 5px; + + } + + #main a.bookmarklet { + + font-size: 1.4em; + background-color: #ccc; + color: #666; + border: 1px solid #666; + display: inline-block; + padding: 5px 10px; + + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + + } + + #main form input[type=text], + #main form input[type=password] { + + display: block; + position: relative; + border: 1px solid #999; + font-size: .9em; + padding: 3px; + + border-radius: 5px; + -o-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + + } + + #main form input[type=submit] { + + display: block; + position: relative; + border: 1px solid #ccc; + color: #111; + font-size: .9em; + padding: 2px; + + border-radius: 5px; + -o-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + + + } + + #main form span.input { + + display: inline-block; + position: relative; + border: 1px solid #999; + font-size: .9em; + padding: 0px 2px; + background-color: #fff; + border-radius: 5px; + -o-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + + + } + + #main form span.input input[type=text] { + + display: inline-block; + position: relative; + border-width: 0px; + font-size: 1em; + padding: 0px; + background-color: #fff; + + } + + #main form span.input input[type=text].right { + + text-align: right; + + } + + #main form span.input input.size-2 { + + width: 1.5em !important; + + } + + #main form span.input input.size-4 { + + width: 2.5em !important; + + } + + #main form label { + + display: block; + position: relative; + font-size: .75em; + color: #666; + + } + + #main form textarea { + + display: block; + position: relative; + border: 1px solid #999; + font-size: .9em; + font-family: sans-serif; + padding: 3px; + + border-radius: 5px; + -o-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + + } + + + #main form fieldset { + + border: 1px solid #ccc; + padding: 5px; + margin: 5px 0px; + + } + + #main form fieldset legend { + + font-size: .75em; + color: #666; + + } + + #sidebar {} + + #sidebar h3 { + + display: block; + position: relative; + color: #fff; + font-size: 1.2em; + line-height: 1.4em; + margin: 5px 0px; + + } + + #sidebar .item { + + display: block; + position: relative; + + padding: 0px 10px; + + border-radius: 10px; + -o-border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + + -moz-box-shadow: 0px 0px 20px #eee; + -o-box-shadow: 0px 0px 20px #eee; + -webkit-box-shadow: 0px 0px 20px #eee; + box-shadow: 0px 0px 20px #eee; + + background-color: #333; + margin-bottom: 20px; + font-size: .8em; + + } + + #sidebar .center { + + text-align: center; + + } + + #sidebar .counter-item .content { + + font-size: 3em; + color: #c03; + font-weight: bold; + line-height: 1em; + padding-bottom: 5px; + text-align: center; + + } + + #sidebar .submenu-item { + + background-color: #ddd; + + } + + #sidebar .submenu-item ul {} + + #sidebar .submenu-item ul li {} + + #sidebar .submenu-item ul li+li { + + border-top: 1px dotted #999; + + } + + #sidebar .submenu-item ul a { + + color: #c03; + text-decoration: none; + text-transform: uppercase; + + } + + #sidebar .submenu-item ul a:hover { + + color: #a01; + + } + + #foot-container { + + display: block; + position: relative; + background: #222; + color: #ddd; + + } + + #foot { + + display: block; + position: relative; + width: 960px; + margin: 0px auto; + padding: 20px; + font-size: .8em; + + } + + #foot a { + + text-decoration: none; + color: #c03; + + } + diff -r 0f3063b5e96b -r e7b44716a564 doc/current.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/current.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,385 @@ + + + + + + Iro · API docs + + + + + + + + + + + + +
+
+
+

API Dokumentation

+
+

+

+
    +
  1. 1. Einführung
  2. +
  3. 2. + Interfaces +
      +
    1. 2.1 XML-RPC
    2. +
    +
  4. +
  5. 3. + Methoden +
      +
    1. 3.1 StartSMS
    2. 3.2 StartFAX
    3. 3.3 StartMail
    4. 3.4 Status
    5. 3.5 Stop
    6. 3.6 GetProvider
    7. 3.7 GetDefaultProvider
    8. +
    +
  6. +
+
+

Einführung

+

+ Die Iro API enthält Funktion, die für den Massenversand nützlich sind. +

+
+

Interfaces

+

+ Die Iro API stellt zur Zeit nur ein Interfaces bereit. +

+
+

XML-RPC

+

+ Interface-URI: https://<benutzer>:<passwort>@localhost:8000 +

+

+ Die aufgerufene Methode wird dabei im <methodName /> übergeben. +

+
+
+

Methoden

+
+

StartSMS

+

startSMS

+

Versendet eine SMS.

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
messagestring Nachricht
recipientslist eine Liste von Emfänger-Nummern (gemäß ITU-T E.123)
providerstring Provider über den geschickt werden soll; +default - verschickt über den Standardprovider
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
idhash Die ID des Auftrages
+
+

StartFAX

+

startFAX

+

Versendet ein FAX.

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
subjectstring der Betreff
faxstring das pdf base64 kodiert
recipientslist eine Liste von Emfänger-Nummern (gemäß ITU-T E.123)
providerstring Provider über den geschickt werden soll; +default - verschickt über den Standardprovider
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
idhash Die ID des Auftrages
+
+

StartMail

+

startMail

+

Versendet eine Email.

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
subjectstring der Betreff
bodystring der Email Body
recipientslist eine Liste von Emailadressen
frmstring Die Absender Emailadresse
providerstring Provider über den geschickt werden soll; +default - verschickt über den Standardprovider
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
idhash Die ID des Auftrages
+
+

Status

+

status

+

Gibt den aktuellen Status eines Auftrages zurück.

+
Parameter
+ + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
idhash Eine Auftragsnummer +default - alle Aufträge ausgeben
detailedboolean Details ausgeben +default - False
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
jobslist Eine Liste der Aufträge.
job.namestring Angebener Name
job.statusstring Status des Auftrages
+
+

Stop

+

stop

+

Stoppt den angegeben Auftrag.

+
Parameter
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
idhash Eine Auftragsnummer
+
+

GetProvider

+

getProvider

+

Gibt eine Liste aller verfügbaren Provider zurück.

+
Parameter
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
typstring Der Typ zu dem die Providerloste ausgeben werden soll +Einer der Liste ["sms","fax","mail"]
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
providerlistlist Eine Liste aller möglichen Provider
+
+

GetDefaultProvider

+

getDefaultProvider

+

Gibt den Standardprovider zurück.

+
Parameter
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
typstring Der Typ zu dem die Providerloste ausgeben werden soll +Einer der Liste ["sms","fax","mail"]
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
providerstring Der Standardprovider für den angeben Typ
+
+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/images/netzguerilla-3.png Binary file doc/images/netzguerilla-3.png has changed diff -r 0f3063b5e96b -r e7b44716a564 doc/impressum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/impressum.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,62 @@ + + + + + + Iro · Impressum + + + + + + + + + + + + +
+
+
+

Impressum

+
+

Kontakt

+

+ Netzguerilla.net Clerc Knauß Vollnhals GbR
+ Manteuffelstraße 40
+ 10997 Berlin +

+

+ WWW: netzguerilla.net
+

+

+ E-Mail: iro@netzguerilla.net
+

+

+ Telefon: +49 30 69201075
+

+

Inhaltlich verantwortlich

+

+ Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV bzw. §5 TMG sowie beauftragt mit dem Jugendschutz gemäß TMG, JMStV sowie GjSM:
+ Sandro Knauß, Anschrift wie oben, iro@netzguerilla.net +

+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/index.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,45 @@ + + + + + + Iro · work in progress + + + + + + + + + + + + +
+
+
+

Iro

+
+

+ Iro ist toll, ist aber noch nicht fertig. +

+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/new.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/new.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,1036 @@ + + + + + + Iro · api docs new + + + + + + + + + + + + +
+
+
+

geplante API Dokumentation

+
+

+

+
    +
  1. 1. Einführung
  2. +
  3. 2. + Interfaces +
      +
    1. 2.1 XML-RPC
    2. +
    3. 2.2 XML
    4. +
    5. 2.3 JSON
    6. +
    7. 2.4 JSONP
    8. +
    9. 2.5 PHP
    10. +
    +
  4. +
  5. 3. + Methoden +
      +
    1. 3.1 Route
    2. +
    3. 3.2 Dist
    4. +
    5. 3.3 Geocode
    6. +
    7. 3.4 SMS
    8. +
    9. 3.5 Bank
    10. +
    11. 3.6 Boxcar
    12. +
    13. 3.7 Postcode-Match
    14. +
    15. 3.8 Postcode-Shape
    16. +
    +
  6. +
  7. 4. Fehlermeldungen
  8. +
+
+

Einführung

+

+ Die Mesngr API enthält viele Funktionen, die von Fahrradkurierdiensten benötigt werden. +

+
+

Interfaces

+

+ Die Mesngr API stellt verschiedene Interfaces bereit, die unterschiedlich angesprochen werden, aber das selbe tun. +

+
+

XML-RPC

+

+ Interface-URI: http://api.mesngr.de/xmlrpc +

+

+ Die aufgerufene Methode wird dabei im <methodName /> übergeben. +

+

+ Das XML-RPC Interface nimmt die Parameter der aufgerufenen Methode als <struct /> inerhalb des ersten <param /> entgegen, alle weiteren <param />s werden ignoriert. +

+

+ Zeichen außerhalb des ASCII-Sets sind als HTML Entities zu übergeben. +

+
+
+

XML

+

+ Interface-URI: http://api.mesngr.de/xml/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als XML Markup. +

+
+
+

JSON

+

+ Interface-URI: http://api.mesngr.de/json/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded oder JSON-Objekt übergeben werden. +

+

+ Die Ausgabe erfolgt als JSON-Objekt. +

+
+
+

JSONP

+

+ Interface-URI: http://api.mesngr.de/jsonp/<methode>?callback=<callback> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Der Name für die Callback-Methode wird als Parameter Callback übergeben. +

+

+ Parameter können via HTTP per GET im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als Javascript-Funktionsaufruf mit einem JSON-Objekt als Parameter. +

+
+
+

PHP

+

+ Interface-URI: http://api.mesngr.de/php/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als serialisiertes PHP-Objekt. +

+
+
+

Methoden

+
+

Route

+

route

+

+ Diese Methode ermittelt die Routing-Entfernung zwischen zwei Koordinaten. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
typeenum[car,bicycle,foot]Die gewünschte Routing-Methode
flonfloatDer Längengrad des Startpunktes
flatfloatDer Breitengrad des Startpunktes
tlonfloatDer Längengrad des Zielpunktes
tlatfloatDer Breitengrad des Zielpunktes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
distancefloatDie ermittelte Routing-Distanz in km
+
+
+

Dist

+

dist

+

+ Diese Methode ermittelt die direkte Entfernung zwischen zwei Koordinaten. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
flonfloatDer Längengrad des Startpunktes
flatfloatDer Breitengrad des Startpunktes
tlonfloatDer Längengrad des Zielpunktes
tlatfloatDer Breitengrad des Zielpunktes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
distancefloatDie ermittelte Routing-Distanz in km
+
+
+

Geocode

+

geocode

+

+ Ermittelt die Koordinaten zu einer Adresse. Diese Methode ist Kostenpflichtig. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
typeenum[fast, complete]Die Eingabemethode. Im Modus fast wird der Parameter number an den Parameter street angehängt sowie der Parameter postcode vor den Parameter city; Die Parameter postcode und number werden dann ignoriert.
streetstrDer Straßenname der Adresse
numberstrDie Hausnummer der Adresse
postcodestrDie Postleitzahl der Adresse
citystrDie Stadt der Adresse
countrystrDas Land der Adresse, ISO 3166
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
stageenum[1,2,3] + Grad des Erfolges des Geocodings:
+ 1 → Es stehen mehrere mögliche Adressen zur Auswahl.
+ 2 → Eine mögliche Adresse als Korrekturvorschlag.
+ 3 → Die Adresse konnte verifiziert und zugehörige Geokoordinaten ermittelt werden. +
dataarray + Die ermittelten Adressdaten +
data[i]array + Ein ermittelter Adressdatensatz +
data[i][street]strName der Straße
data[i][nr]strHausnummer
data[i][fragment]strHausnummernzusatz (z.B. a bei 12a)
data[i][postcode]strPostleitzahl
data[i][city]strOrt
data[i][country]str[2]Land (gemäß ISO 3166)
data[i][accuracy]intGenauigkeit (Genau > Ungenau)
data[i][lat]floatBreitengrad
data[i][lon]floatLängengrad
+
+
+

SMS

+

sms

+

+ Versendet eine SMS-Nachricht. Diese Methode ist kostenpflichtig. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
fromstr[11]|tel[16]Der gewünschte Absender (optional)
totel[15]Emfänger-Nummer (gemäß ITU-T E.123)
refstrReferenz für Antworten
callbackstrCallback-URL für SMS-Antworten. Noch nicht implementiert.
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
+
+
+

Bank

+

bank

+

+ Prüft Bankdaten auf Plausibilität. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
country[de]Das Land des Bankdatenformates
bankint[8]Die Bankleitzahl
accountint[10]Die Kontonummer (optional)
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
bankarrayDer Bankdatensatz
bank[id]int[8]Die Bankleitzahl
bank[name]strName der Bank
bank[city]strStadt
bank[bic]strDer BIC der Bank
accountarrayDer Kontodatensatz
account[id]int[10]Die Kontonummer
+
+
+

Boxcar

+

boxcar

+

+ Sendet eine Push-Notification via Boxcar. Ist der Boxcar-user nicht subskribiert, wird statt der Nachricht eine Subskriptions-Anfrage gesendet. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
tostrE-Mail-Adresse des Boxcar-Accounts
fromstrAbsender
messagestrDie Nachricht
urlstrDie URL die aufgerufen werden soll
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
+
+
+

Postcode-Match

+

postcodematch

+

+ Liefert die Schwerpunkt-Koordinaten aller Postleizahlengebiete innerhalb eines Bereiches. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
bbox_nfloatMaximale Latitude
bbox_sfloatMinimale Latitude
bbox_efloatMaximale Longitude
bbox_wfloatMinimale Longitude
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
postcodesarrayErgebnisse
postcodes[i]arrayErgebnis
postcodes[i][postcode]strPostleitzahl
postcodes[i][lat]floatLatitude des Schwerpunktes
postcodes[i][lon]floatLongitude des Schwerpunktes
+
+
+

Postcode-Shape

+

postcodeshape

+

+ Gibt eine Näherung an die geografische Definition eines Postleitzahlengebietes aus. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
postcodestrDie Postleitzahl des Gebietes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
postcodestr
centerarray
center[lat]flaot
center[lon]flaot
bboxarray
bbox[n]float
bbox[s]float
bbox[w]float
bbox[e]float
shapearrayAlle Shapes dieses Postleitzahlengebietes
shape[i]arrayEin Shape des Postleitzahlengebietes
shape[i][j]arrayEin Punkt des Shapes
shape[i][j][lat]arrayDie Latitude des Punktes
shape[i][j][lon]arrayDie Longitude des Punktes
+
+
+

Fehlercode

+

+ Wenn der Ausgabeparameter status einen Fehler indiziert, werden alle weiteren Ausgabeparameter ersetzt durch die Parameter code und msg. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
codeint[3]Fehlercode
msgstrFehlermeldung
resultOptionale weitere Daten
+

Fehlercodes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeBedeutung
900Die aufgerufene Methode existiert nicht
901Der API-Key ist ungültig
902Fehler in externer API
903Encoding-Problem: Ein Nicht-UTF-8-Zeichen hat den Parser gestoppt
904Es wurden keine gültigen JSON-Daten im POST-Request gefunden
910Ungültige Eingabemethode
911Die eingegebenen Daten reichen nicht aus, um die Adresse zu bestimmen
912Die Adresse wurde nicht gefunden
913Für diese Adresse wurden keine Koordinaten gefunden
914Die Koordinaten für diese Adresse sind nicht eindeutig
921Ungültige Koordinaten
922Keine Route gefunden
930Keine Verbindung zum Gateway
931Empfänger fehlerhaft
932Absenderkennung zu lang
933Nachrichtentext zu lang
934Messagetyp nicht korrekt
935Falscher SMS-Typ
936Fehler bei Login
937Guthaben zu gering
938Netz wird von Route nicht unterstützt
939Feature nicht über diese Route möglich
940Ungültige BLZ
941Ungültige Kontonummer
942Ungültiges Land
945Ungültiger Empfänger
946Keine Nachricht angegeben
947Der Empfänger ist nicht subskribiert
948Der Empfänger hat den Dienst abgeschaltet
950Die Postleitzahl ist ungültig.
951Für diese Postleitzahl gibt es keine Shapes.
952In diesem Bereich wurden keine Postleitzahlen gefunden.
953Dieser Bereich enthält zu viele Postleitzahlen.
999Unbekannter Fehler
+
+
+
+
+
+
+ +
+ + \ No newline at end of file diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/current.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/current.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,100 @@ + + + + + API docs + + + API Dokumentation +
+

+ +

+
    +
  1. 1. Einführung
  2. +
  3. 2. + Interfaces +
      +
    1. 2.1 XML-RPC
    2. +
    +
  4. +
  5. 3. + Methoden +
      +
    1. 3.${key+1} ${method.title}
    2. +
    +
  6. +
+
+
+

Einführung

+

+ Die Iro API enthält Funktion, die für den Massenversand nützlich sind. +

+
+
+

Interfaces

+

+ Die Iro API stellt zur Zeit nur ein Interfaces bereit. +

+
+

XML-RPC

+

+ Interface-URI: https://<benutzer>:<passwort>@localhost:8000 +

+

+ Die aufgerufene Methode wird dabei im <methodName /> übergeben. +

+
+
+
+

Methoden

+
+

${method.title}

+

${method.name}

+

+ Diese Methode at bis jetzt noch keine Beschreibung. +

+
Parameter
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
${arg.name}${arg.typ}${arg.description}
+ +
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
${arg.name}${arg.typ}${arg.description}
+
+
+
+ + diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/impressum.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/impressum.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,36 @@ + + + + + Impressum + + + Impressum + +
+

Kontakt

+

+ Netzguerilla.net Clerc Knauß Vollnhals GbR
+ Manteuffelstraße 40
+ 10997 Berlin +

+

+ WWW: netzguerilla.net
+

+

+ E-Mail: iro@netzguerilla.net
+

+

+ Telefon: +49 30 69201075
+

+

Inhaltlich verantwortlich

+

+ Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV bzw. §5 TMG sowie beauftragt mit dem Jugendschutz gemäß TMG, JMStV sowie GjSM:
+ Sandro Knauß, Anschrift wie oben, iro@netzguerilla.net +

+
+ + diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/index.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,20 @@ + + + + + work in progress + + + Iro +
+

+ Iro ist toll, ist aber noch nicht fertig. +

+
+ + + + diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/layout.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/layout.tmpl Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,52 @@ + + + + + + Iro <py:if test="title">· ${title}</py:if> + + + + + + + + + + ${select('*[local-name()!="title"]')} + + + + + +
+ +
+ + +
+
+
+

${title}

+ ${select('*[local-name()!="title"]')} +
+
+
+
+ +
+ +
+ + +
+ diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/layout.tmpl.bak --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/layout.tmpl.bak Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,15 @@ + + + + Geddit + + + +

Welcome!

+ + + diff -r 0f3063b5e96b -r e7b44716a564 doc/tmpl/new.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/tmpl/new.html Tue Dec 06 19:46:00 2011 +0100 @@ -0,0 +1,1015 @@ + + + + + api docs new + + + geplante API Dokumentation +
+

+ +

+
    +
  1. 1. Einführung
  2. +
  3. 2. + Interfaces +
      +
    1. 2.1 XML-RPC
    2. +
    3. 2.2 XML
    4. +
    5. 2.3 JSON
    6. +
    7. 2.4 JSONP
    8. +
    9. 2.5 PHP
    10. +
    +
  4. +
  5. 3. + Methoden +
      +
    1. 3.1 Route
    2. +
    3. 3.2 Dist
    4. +
    5. 3.3 Geocode
    6. +
    7. 3.4 SMS
    8. +
    9. 3.5 Bank
    10. +
    11. 3.6 Boxcar
    12. +
    13. 3.7 Postcode-Match
    14. +
    15. 3.8 Postcode-Shape
    16. +
    +
  6. +
  7. 4. Fehlermeldungen
  8. +
+
+
+

Einführung

+

+ Die Mesngr API enthält viele Funktionen, die von Fahrradkurierdiensten benötigt werden. +

+
+
+

Interfaces

+

+ Die Mesngr API stellt verschiedene Interfaces bereit, die unterschiedlich angesprochen werden, aber das selbe tun. +

+
+

XML-RPC

+

+ Interface-URI: http://api.mesngr.de/xmlrpc +

+

+ Die aufgerufene Methode wird dabei im <methodName /> übergeben. +

+

+ Das XML-RPC Interface nimmt die Parameter der aufgerufenen Methode als <struct /> inerhalb des ersten <param /> entgegen, alle weiteren <param />s werden ignoriert. +

+

+ Zeichen außerhalb des ASCII-Sets sind als HTML Entities zu übergeben. +

+
+
+

XML

+

+ Interface-URI: http://api.mesngr.de/xml/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als XML Markup. +

+
+
+

JSON

+

+ Interface-URI: http://api.mesngr.de/json/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded oder JSON-Objekt übergeben werden. +

+

+ Die Ausgabe erfolgt als JSON-Objekt. +

+
+
+

JSONP

+

+ Interface-URI: http://api.mesngr.de/jsonp/<methode>?callback=<callback> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Der Name für die Callback-Methode wird als Parameter Callback übergeben. +

+

+ Parameter können via HTTP per GET im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als Javascript-Funktionsaufruf mit einem JSON-Objekt als Parameter. +

+
+
+

PHP

+

+ Interface-URI: http://api.mesngr.de/php/<methode> +

+

+ Die aufgerufene Methode wird im Pfad der Interface-URI übergeben. +

+

+ Parameter können via HTTP per GET oder POST im Format application/x-www-form-urlencoded übergeben werden. +

+

+ Die Ausgabe erfolgt als serialisiertes PHP-Objekt. +

+
+
+
+

Methoden

+
+

Route

+

route

+

+ Diese Methode ermittelt die Routing-Entfernung zwischen zwei Koordinaten. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
typeenum[car,bicycle,foot]Die gewünschte Routing-Methode
flonfloatDer Längengrad des Startpunktes
flatfloatDer Breitengrad des Startpunktes
tlonfloatDer Längengrad des Zielpunktes
tlatfloatDer Breitengrad des Zielpunktes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
distancefloatDie ermittelte Routing-Distanz in km
+
+
+

Dist

+

dist

+

+ Diese Methode ermittelt die direkte Entfernung zwischen zwei Koordinaten. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
flonfloatDer Längengrad des Startpunktes
flatfloatDer Breitengrad des Startpunktes
tlonfloatDer Längengrad des Zielpunktes
tlatfloatDer Breitengrad des Zielpunktes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
distancefloatDie ermittelte Routing-Distanz in km
+
+
+

Geocode

+

geocode

+

+ Ermittelt die Koordinaten zu einer Adresse. Diese Methode ist Kostenpflichtig. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
typeenum[fast, complete]Die Eingabemethode. Im Modus fast wird der Parameter number an den Parameter street angehängt sowie der Parameter postcode vor den Parameter city; Die Parameter postcode und number werden dann ignoriert.
streetstrDer Straßenname der Adresse
numberstrDie Hausnummer der Adresse
postcodestrDie Postleitzahl der Adresse
citystrDie Stadt der Adresse
countrystrDas Land der Adresse, ISO 3166
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
stageenum[1,2,3] + Grad des Erfolges des Geocodings:
+ 1 → Es stehen mehrere mögliche Adressen zur Auswahl.
+ 2 → Eine mögliche Adresse als Korrekturvorschlag.
+ 3 → Die Adresse konnte verifiziert und zugehörige Geokoordinaten ermittelt werden. +
dataarray + Die ermittelten Adressdaten +
data[i]array + Ein ermittelter Adressdatensatz +
data[i][street]strName der Straße
data[i][nr]strHausnummer
data[i][fragment]strHausnummernzusatz (z.B. a bei 12a)
data[i][postcode]strPostleitzahl
data[i][city]strOrt
data[i][country]str[2]Land (gemäß ISO 3166)
data[i][accuracy]intGenauigkeit (Genau > Ungenau)
data[i][lat]floatBreitengrad
data[i][lon]floatLängengrad
+
+
+

SMS

+

sms

+

+ Versendet eine SMS-Nachricht. Diese Methode ist kostenpflichtig. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
fromstr[11]|tel[16]Der gewünschte Absender (optional)
totel[15]Emfänger-Nummer (gemäß ITU-T E.123)
refstrReferenz für Antworten
callbackstrCallback-URL für SMS-Antworten. Noch nicht implementiert.
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
+
+
+

Bank

+

bank

+

+ Prüft Bankdaten auf Plausibilität. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
country[de]Das Land des Bankdatenformates
bankint[8]Die Bankleitzahl
accountint[10]Die Kontonummer (optional)
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
bankarrayDer Bankdatensatz
bank[id]int[8]Die Bankleitzahl
bank[name]strName der Bank
bank[city]strStadt
bank[bic]strDer BIC der Bank
accountarrayDer Kontodatensatz
account[id]int[10]Die Kontonummer
+
+
+

Boxcar

+

boxcar

+

+ Sendet eine Push-Notification via Boxcar. Ist der Boxcar-user nicht subskribiert, wird statt der Nachricht eine Subskriptions-Anfrage gesendet. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
tostrE-Mail-Adresse des Boxcar-Accounts
fromstrAbsender
messagestrDie Nachricht
urlstrDie URL die aufgerufen werden soll
+
Ausgabe
+ + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
+
+
+

Postcode-Match

+

postcodematch

+

+ Liefert die Schwerpunkt-Koordinaten aller Postleizahlengebiete innerhalb eines Bereiches. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
bbox_nfloatMaximale Latitude
bbox_sfloatMinimale Latitude
bbox_efloatMaximale Longitude
bbox_wfloatMinimale Longitude
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
postcodesarrayErgebnisse
postcodes[i]arrayErgebnis
postcodes[i][postcode]strPostleitzahl
postcodes[i][lat]floatLatitude des Schwerpunktes
postcodes[i][lon]floatLongitude des Schwerpunktes
+
+
+

Postcode-Shape

+

postcodeshape

+

+ Gibt eine Näherung an die geografische Definition eines Postleitzahlengebietes aus. +

+
Parameter
+ + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
apikeystr[20]Der API Key
postcodestrDie Postleitzahl des Gebietes
+
Ausgabe
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
postcodestr
centerarray
center[lat]flaot
center[lon]flaot
bboxarray
bbox[n]float
bbox[s]float
bbox[w]float
bbox[e]float
shapearrayAlle Shapes dieses Postleitzahlengebietes
shape[i]arrayEin Shape des Postleitzahlengebietes
shape[i][j]arrayEin Punkt des Shapes
shape[i][j][lat]arrayDie Latitude des Punktes
shape[i][j][lon]arrayDie Longitude des Punktes
+
+
+
+

Fehlercode

+

+ Wenn der Ausgabeparameter status einen Fehler indiziert, werden alle weiteren Ausgabeparameter ersetzt durch die Parameter code und msg. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterTypBeschreibung
statusboolFehlerindikator
codeint[3]Fehlercode
msgstrFehlermeldung
resultOptionale weitere Daten
+

Fehlercodes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeBedeutung
900Die aufgerufene Methode existiert nicht
901Der API-Key ist ungültig
902Fehler in externer API
903Encoding-Problem: Ein Nicht-UTF-8-Zeichen hat den Parser gestoppt
904Es wurden keine gültigen JSON-Daten im POST-Request gefunden
910Ungültige Eingabemethode
911Die eingegebenen Daten reichen nicht aus, um die Adresse zu bestimmen
912Die Adresse wurde nicht gefunden
913Für diese Adresse wurden keine Koordinaten gefunden
914Die Koordinaten für diese Adresse sind nicht eindeutig
921Ungültige Koordinaten
922Keine Route gefunden
930Keine Verbindung zum Gateway
931Empfänger fehlerhaft
932Absenderkennung zu lang
933Nachrichtentext zu lang
934Messagetyp nicht korrekt
935Falscher SMS-Typ
936Fehler bei Login
937Guthaben zu gering
938Netz wird von Route nicht unterstützt
939Feature nicht über diese Route möglich
940Ungültige BLZ
941Ungültige Kontonummer
942Ungültiges Land
945Ungültiger Empfänger
946Keine Nachricht angegeben
947Der Empfänger ist nicht subskribiert
948Der Empfänger hat den Dienst abgeschaltet
950Die Postleitzahl ist ungültig.
951Für diese Postleitzahl gibt es keine Shapes.
952In diesem Bereich wurden keine Postleitzahlen gefunden.
953Dieser Bereich enthält zu viele Postleitzahlen.
999Unbekannter Fehler
+
+ +