update documentation of api.api
This commit is contained in:
parent
27c701b97a
commit
edf876c119
1 changed files with 14 additions and 20 deletions
|
@ -55,27 +55,21 @@ class ApiActions(dict):
|
||||||
|
|
||||||
def api(request, data):
|
def api(request, data):
|
||||||
'''
|
'''
|
||||||
returns list of all known api actions
|
Returns a list of all api actions
|
||||||
param data {
|
takes {
|
||||||
docs: bool
|
code: boolean, // if true, return source code (optional)
|
||||||
}
|
docs: boolean // if true, return doc strings (optional)
|
||||||
if docs is true, action properties contain docstrings
|
}
|
||||||
return {
|
returns {
|
||||||
status: {'code': int, 'text': string},
|
actions: {
|
||||||
data: {
|
name: {
|
||||||
actions: {
|
cache: boolean, // if false, don't cache results
|
||||||
'api': {
|
code: string, // source code
|
||||||
cache: true,
|
doc: string // doc strings
|
||||||
doc: 'recursion'
|
},
|
||||||
},
|
... // more actions
|
||||||
'hello': {
|
|
||||||
cache: true,
|
|
||||||
..
|
|
||||||
}
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
'''
|
'''
|
||||||
docs = data.get('docs', False)
|
docs = data.get('docs', False)
|
||||||
code = data.get('code', False)
|
code = data.get('code', False)
|
||||||
|
|
Loading…
Reference in a new issue