Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the new metadata library endpoint for queries #504

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_library_from_library_id(library_id: Union[int | str]) -> Dict:
:param library_id:
:return:
"""
endpoint = "library"
endpoint = "api/v1/library"

# Get library id
if isinstance(library_id, str):
Expand Down Expand Up @@ -99,6 +99,6 @@ def get_all_libraries() -> List[Dict]:
Collect all libraries from the database
:return:
"""
endpoint = "library"
endpoint = "api/v1/library"

return get_request_response_results(endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def list_libraries_in_specimen(specimen_id: Union[str, int]) -> List[Dict]:
# If subject id is a string, we have the internal id (SBJ...)
specimen = get_specimen_from_specimen_id(specimen_id)

endpoint = f"library"
endpoint = f"api/v1/library"

# Get the subject
return list(
Expand All @@ -63,7 +63,7 @@ def get_all_specimens():
Get all specimens from the specimen database
:return:
"""
endpoint = "specimen"
endpoint = "api/v1/specimen"

return get_request_response_results(endpoint)

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_subject_from_subject_id(subject_id: Union[str, int]) -> Dict:
:param subject_id:
:return:
"""
endpoint = "subject"
endpoint = "api/v1/subject"

# Get subject id
if isinstance(subject_id, str):
Expand Down Expand Up @@ -80,6 +80,6 @@ def get_all_subjects() -> List[Dict]:
:return:
"""

endpoint = "subject"
endpoint = "api/v1/subject"

return get_request_response_results(endpoint)