Skip to content

Commit

Permalink
Merge pull request #10 from gabrielmscampos/feat/add-datasets-accepte…
Browse files Browse the repository at this point in the history
…d-function
  • Loading branch information
nothingface0 authored Oct 22, 2024
2 parents edfa0c1 + 75f2a54 commit 3a1e283
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions runregistry/runregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,14 @@ def _execute_request_for_single_run(run_number, new_class):
'Invalid input for "run_numbers". Please provide a list of numbers.'
)
return answers


def get_datasets_accepted():
"""
Method for fetching current datasets accepted in Offline Run Registry
"""
url = "{}/datasets_accepted".format(api_url)
headers = _get_headers(token=_get_token())
if os.getenv("ENVIRONMENT") in ["development", "local"]:
print(url)
return requests.get(url, headers=headers).json()

0 comments on commit 3a1e283

Please sign in to comment.