forked from ScoDoc/ScoDoc
doc
This commit is contained in:
parent
0d20da4583
commit
d072af8da5
@ -9,14 +9,22 @@
|
|||||||
python -i exemple-api-basic.py
|
python -i exemple-api-basic.py
|
||||||
|
|
||||||
|
|
||||||
Pour utiliser l'API, (sur une base quelconque) je fais
|
Pour utiliser l'API, (sur une base quelconque):
|
||||||
```
|
```
|
||||||
cd /opt/scodoc/tests/api
|
cd /opt/scodoc/tests/api
|
||||||
|
|
||||||
python
|
python -i exemple-api-basic.p
|
||||||
>>> admin_h = get_auth_headers("admin", "xxx")
|
>>> admin_h = get_auth_headers("admin", "xxx")
|
||||||
>>> GET("/etudiant/etudid/14806", headers=admin_h)
|
>>> GET("/etudiant/etudid/14806", headers=admin_h)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Créer éventuellement un fichier `.env` dans /opt/scodoc/tests/api
|
||||||
|
avec la config du client API:
|
||||||
|
```
|
||||||
|
SCODOC_URL = "http://localhost:5000/"
|
||||||
|
API_USER = "admin"
|
||||||
|
API_PASSWORD = "test"
|
||||||
|
```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from email import message
|
from email import message
|
||||||
|
Loading…
Reference in New Issue
Block a user