Changements environnement
This commit is contained in:
parent
fd0b15c9c4
commit
d4bf1607f7
5 changed files with 19 additions and 23 deletions
|
@ -1,16 +0,0 @@
|
|||
import pandas as pd
|
||||
import requests
|
||||
|
||||
import utils.config as config
|
||||
|
||||
API_URL = config.API_URL
|
||||
|
||||
|
||||
def get_idreseausocial(nom, endpoint=f"{API_URL}/reseauxsociaux/"):
|
||||
reseaux_sociaux = pd.DataFrame(requests.get(endpoint).json())
|
||||
return list(reseaux_sociaux[reseaux_sociaux["nom"] == nom]["id"])[0]
|
||||
|
||||
|
||||
def get_idtypedocument(nom, endpoint=f"{API_URL}/typedocuments/"):
|
||||
type_documents = pd.DataFrame(requests.get(endpoint).json())
|
||||
return list(type_documents[type_documents["nom"] == nom]["id"])[0]
|
Loading…
Add table
Add a link
Reference in a new issue