From 95f36c35014a800cf3facdd70b0eb6e816446b09 Mon Sep 17 00:00:00 2001 From: frehburg Date: Fri, 4 Oct 2024 16:14:29 +0200 Subject: [PATCH] changed to accept string and int ids --- src/phenopacket_mapper/api_requests/orpha_api_request.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/phenopacket_mapper/api_requests/orpha_api_request.py b/src/phenopacket_mapper/api_requests/orpha_api_request.py index fb12090..3dd0798 100644 --- a/src/phenopacket_mapper/api_requests/orpha_api_request.py +++ b/src/phenopacket_mapper/api_requests/orpha_api_request.py @@ -1,3 +1,5 @@ +from typing import Union + from bs4 import BeautifulSoup from phenopacket_mapper.data_standards import CodeSystem @@ -14,7 +16,7 @@ class OrphaAPIRequest(APIRequestSuperClass): def __init__(self, orpha_code_system: CodeSystem = ORDO) -> None: self.orpha_code_system = orpha_code_system - def get(self, concept_id: int) -> Coding: + def get(self, concept_id: Union[str, int]) -> Coding: """Get details about a concept from the Orphanet API.""" html = rest_get(self.api_base_url + str(concept_id))