Skip to content

Commit

Permalink
chore: add page size as configuration parameter (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 authored Nov 19, 2024
1 parent 9d6aa69 commit c508510
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(self, config: Dict):
super().__init__(authenticator=config["authenticator"])
self._transformer = DataTypeEnforcer(self.get_json_schema())
self.config = config
page_size = self.config.get("page_size", None)
if page_size:
self.limit = page_size

@property
def url_base(self) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
"format": "date",
"order": 3
},
"page_size": {
"type": "integer",
"title": "Page Size",
"description": "The number of records to fetch per API call. The default is 250.",
"default": 250,
"minimum": 50,
"maximum": 250,
"order": 4
}
}
}
Expand Down

0 comments on commit c508510

Please sign in to comment.