Skip to content

Commit

Permalink
convert boolean parameter values to lowercase strings
Browse files Browse the repository at this point in the history
  • Loading branch information
trevisanj committed Apr 17, 2021
1 parent bf02690 commit a5fabea
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 @@ -45,6 +44,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 a5fabea

Please sign in to comment.