sample api app
This commit is contained in:
parent
0d49874df1
commit
9eca98c1d4
6 changed files with 54 additions and 17 deletions
22
cbapi_ldap/views.py
Normal file
22
cbapi_ldap/views.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from jsonrpc import jsonrpc_method
|
||||
|
||||
TODO = [
|
||||
'',
|
||||
]
|
||||
|
||||
@jsonrpc_method("ping", authenticated=True)
|
||||
def ping(request, username, password):
|
||||
"""Ping - Echo Request
|
||||
|
||||
:returns str: echo_response
|
||||
"""
|
||||
echo_response = "PONG"
|
||||
return echo_response
|
||||
|
||||
@jsonrpc_method("todo")
|
||||
def todo(request):
|
||||
"""Todo - List ToDo Items
|
||||
|
||||
:returns list: todolist
|
||||
"""
|
||||
return TODO
|
||||
Loading…
Add table
Add a link
Reference in a new issue