Skip to content

Commit

Permalink
Merge pull request man-c#36 from trevisanj/master
Browse files Browse the repository at this point in the history
convert boolean parameter values to lowercase strings
  • Loading branch information
man-c authored Apr 18, 2021
2 parents f3296b5 + a5fabea commit b747cfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from .utils import list_args_to_comma_separated


class CoinGeckoAPI:
__API_URL_BASE = 'https://api.coingecko.com/api/v3/'

Expand Down Expand Up @@ -48,6 +47,9 @@ def __api_url_params(self, api_url, params, api_url_has_params=False):
# arguments passed as parameters)
api_url += '&' if api_url_has_params else '?'
for key, value in params.items():
if type(value) == bool:
value = str(value).lower()

api_url += "{0}={1}&".format(key, value)
api_url = api_url[:-1]
return api_url
Expand Down

0 comments on commit b747cfd

Please sign in to comment.