make api more pythonic, add __doc__ to functions
This commit is contained in:
parent
7507b32383
commit
1ac0604b9f
2 changed files with 37 additions and 21 deletions
23
README
23
README
|
|
@ -24,15 +24,16 @@ pandora client example:
|
|||
|
||||
|
||||
just using the API:
|
||||
api = pandora_client.API("http://localhost:8000/api/")
|
||||
r = api.find({
|
||||
'query': {'conditions':[]},
|
||||
'keys': ['title', 'year'],
|
||||
'range': [0, 100]
|
||||
})
|
||||
for i in r['data']['items']:
|
||||
...
|
||||
|
||||
api features and documentation is available at the api end point,
|
||||
i.e. http://localhost:8000/api/
|
||||
api = pandora_client.API("http://localhost:8000/api/")
|
||||
r = api.find(
|
||||
query={'conditions':[]},
|
||||
keys=['title', 'year'],
|
||||
range=[0, 100]
|
||||
)
|
||||
for i in r['data']['items']:
|
||||
...
|
||||
|
||||
forther api documentation is available as python docstrings.
|
||||
api.find?
|
||||
and there is a web api documentation at i.e. http://localhost:8000/api/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue