Skip to content

Commit

Permalink
adding the get_records function
Browse files Browse the repository at this point in the history
  • Loading branch information
hesspnnl committed Jan 31, 2025
1 parent 53c91c4 commit 5e7c1ba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nmdc_notebook_tools/functional_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ def get_functional_annotation_id(
filter, page_size, fields, all_pages
)
return result

def get_records_by_id(
self,
filter: str = "",
max_page_size: int = 100,
fields: str = "",
all_pages: bool = False,
):
"""
Get a collection of data from the NMDC API. Generic function to get a collection of data from the NMDC API. Can provide a specific filter if desired.
params:
filter: str
The filter to apply to the query. Default is an empty string.
max_page_size: int
The maximum number of items to return per page. Default is 100.
fields: str
The fields to return. Default is all fields.
"""
self.collectioninstance.get_records(filter, max_page_size, fields, all_pages)

0 comments on commit 5e7c1ba

Please sign in to comment.