Home | Trees | Indices | Help |
|
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
example: service = Service(globals()) @service.run def myfunction(a, b): return a + b def call(): return service() Then call it with: wget http://..../app/default/call/run/myfunction?a=3&b=4 |
example: service = Service(globals()) @service.csv def myfunction(a, b): return a + b def call(): return service() Then call it with: wget http://..../app/default/call/csv/myfunction?a=3&b=4 |
example: service = Service(globals()) @service.xml def myfunction(a, b): return a + b def call(): return service() Then call it with: wget http://..../app/default/call/xml/myfunction?a=3&b=4 |
example: service = Service(globals()) @service.rss def myfunction(): return dict(title=..., link=..., description=..., created_on=..., entries=[dict(title=..., link=..., description=..., created_on=...]) def call(): return service() Then call it with: wget http://..../app/default/call/rss/myfunction |
example: service = Service(globals()) @service.json def myfunction(a, b): return [{a: b}] def call(): return service() Then call it with: wget http://..../app/default/call/json/myfunc?a=hello&b=world |
example: service = Service(globals()) @service.jsonrpc def myfunction(a, b): return a + b def call(): return service() Then call it with: wget http://..../app/default/call/jsonrpc/myfunc?a=hello&b=world |
example: service = Service(globals()) @service.xmlrpc def myfunction(a, b): return a + b def call(): return service() The call it with: wget http://..../app/default/call/xmlrpc/myfunction?a=hello&b=world |
example: service = Service(globals()) @service.amfrpc def myfunction(a, b): return a + b def call(): return service() The call it with: wget http://..../app/default/call/amfrpc/myfunction?a=hello&b=world |
example: service = Service(globals()) @service.amfrpc3('domain') def myfunction(a, b): return a + b def call(): return service() The call it with: wget http://..../app/default/call/amfrpc3/myfunction?a=hello&b=world |
register services with: service = Service(globals()) @service.run @service.rss @service.json @service.jsonrpc @service.xmlrpc @service.jsonrpc @service.amfrpc @service.amfrpc3('domain') expose services with def call(): return service() call services with http://..../app/default/call/run?[parameters] http://..../app/default/call/rss?[parameters] http://..../app/default/call/json?[parameters] http://..../app/default/call/jsonrpc http://..../app/default/call/xmlrpc http://..../app/default/call/amfrpc http://..../app/default/call/amfrpc3 |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 3 10:53:21 2010 | http://epydoc.sourceforge.net |