Skip to content

Commit

Permalink
Fix __api_url_params method
Browse files Browse the repository at this point in the history
Use "&" as concatenator in `api_url` if it already has params
  • Loading branch information
gkrasulya authored Feb 8, 2021
1 parent 8b7a845 commit e2907c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __request(self, url):

def __api_url_params(self, api_url, params):
if params:
api_url += '?'
api_url += '&' if '?' in api_url else '?'
for key, value in params.items():
api_url += "{0}={1}&".format(key, value)
api_url = api_url[:-1]
Expand Down

0 comments on commit e2907c0

Please sign in to comment.