Skip to content

Commit

Permalink
Add function for getting list of studies (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzbeh authored Jul 29, 2024
1 parent 1df8568 commit 4acb4e0
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 282 deletions.
14 changes: 14 additions & 0 deletions actiapi/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ def get_study_info(self, study_id) -> List[Dict[str, Any]]:
results = self._get_single(f"/centrepoint/v3/Studies/{study_id}", token)
return results


def get_studies(self) -> List[Dict[str, Any]]:
"""Save high-level study info to file.
Parameters
----------
study_id:
Id of the study
"""
token = self._get_access_token("CentrePoint")

results = self._get_paginated(f"/centrepoint/v3/Studies?", token)
return results

def get_study_metadata(self, study_id) -> List[Dict[str, Any]]:
"""Save all study metadata to file.
Expand Down
Loading

0 comments on commit 4acb4e0

Please sign in to comment.