Skip to content

Commit

Permalink
serialize boolean parameters as lowercase strings in url (#313)
Browse files Browse the repository at this point in the history
* serialize boolean parameters as lowercase strings in url

* fix unit tests

* fix last unit test

* fix last unit test, for real

* lint
  • Loading branch information
suremarc authored Oct 5, 2022
1 parent 0515771 commit 0a4aaa1
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions polygon/rest/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def _get_params(
val = caller_locals.get(argname, v.default)
if isinstance(val, Enum):
val = val.value
elif isinstance(val, bool):
val = str(val).lower()
elif isinstance(val, datetime):
val = int(val.timestamp() * self.time_mult(datetime_res))
if val is not None:
Expand Down

0 comments on commit 0a4aaa1

Please sign in to comment.