Skip to content

Commit

Permalink
changed to accept string and int ids
Browse files Browse the repository at this point in the history
  • Loading branch information
frehburg committed Oct 4, 2024
1 parent 6dd450d commit 95f36c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/phenopacket_mapper/api_requests/orpha_api_request.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Union

from bs4 import BeautifulSoup

from phenopacket_mapper.data_standards import CodeSystem
Expand All @@ -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))

Expand Down

0 comments on commit 95f36c3

Please sign in to comment.