mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
Début implémentation notes autres dans manager backend
This commit is contained in:
@@ -41,7 +41,6 @@ class ApiClient():
|
||||
self.port = port
|
||||
|
||||
def send(self,note,commentaire):
|
||||
|
||||
#Exemple ajout d'un commentaire depuis la borne (site ou geste)
|
||||
avis = {
|
||||
"note": note,
|
||||
@@ -50,3 +49,11 @@ class ApiClient():
|
||||
}
|
||||
print(self.host, self.port)
|
||||
return requests.post("http://"+self.host+":"+self.port+"/add_review", data=avis)
|
||||
def get_criteria(self):
|
||||
res = []
|
||||
crits = json.loads(requests.get("http://"+self.host+":"+self.port+"/borne/get_criteres").text)
|
||||
for c in crits:
|
||||
res.append(c["nom"])
|
||||
return res
|
||||
|
||||
print(ApiClient().get_criteria())
|
||||
|
||||
Reference in New Issue
Block a user