generated from lucien/api-template
Fixed client scripts
This commit is contained in:
parent
c57a2511d8
commit
e2d8d04c04
4 changed files with 48 additions and 26 deletions
|
@ -1,36 +0,0 @@
|
|||
import requests
|
||||
|
||||
"""Affichage des actions mises en vente par une entreprise
|
||||
input :
|
||||
- idComp : Identifiant de l'entreprise
|
||||
"""
|
||||
def showShares(idComp):
|
||||
url = '192.168.200.15/api/companies/'+idComp+'/shares'
|
||||
r = requests.get(url)
|
||||
print(r.text)
|
||||
|
||||
"""Création d'une action par une entreprise
|
||||
input :
|
||||
- idComp : identifiant de l'entreprise
|
||||
- price : prix de l'action sur le marché
|
||||
"""
|
||||
def newShare(idComp, price):
|
||||
url = '192.168.200.15/api/shares/emmit'
|
||||
obj={'id':idComp,'price':price}
|
||||
r = requests.post(url, json=obj)
|
||||
print(r.text)
|
||||
|
||||
"""Affichage des informations d'une enteprise
|
||||
input :
|
||||
- idComp : identifiant de l'entreprise
|
||||
"""
|
||||
def showInfoComp(idComp):
|
||||
url='192.168.200.15/api/companies/'+idComp
|
||||
r=requests.get(url)
|
||||
print(r.text)
|
||||
|
||||
"""Affichage les enteprises """
|
||||
def showComp():
|
||||
url='192.168.200.15/api/companies/'
|
||||
r=requests.get(url)
|
||||
print(r.text)
|
Loading…
Add table
Add a link
Reference in a new issue