Commit acd7c526 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

Add a web service that retrieves ORCID account details

WIP on #246
parent 27a7dabf
Pipeline #42937 failed with stages
in 4 minutes and 39 seconds
......@@ -536,3 +536,13 @@ def get_ligand_id(smiles: str) -> str:
raise EntryNotFoundError(
smiles, msg=str(f"ligand for smiles {smiles} not found in PDB Ligand")
def get_orcid_user_details(orcid: str) -> str:
endpoint = f"{orcid}/person"
resp = requests.get(endpoint, headers={"Accept": "application/json"},)
data = resp.json()
return {
"first": data["name"]["given-names"]["value"],
"last": data["name"]["family-name"]["value"],
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment