Skip to content

Commit

Permalink
Merge pull request #24 from clvrk/dev
Browse files Browse the repository at this point in the history
Fix arg passed in, not working
  • Loading branch information
firstaidguyheru authored Apr 20, 2021
2 parents b2a8c8c + f175e6e commit 2813fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cocktaildb/cocktaildb.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def glasses(key: str = None):
# Returns a list of glasses

key = key or 1
category_url = 'www.thecocktaildb.com/api/json/v1/1/list.php?g=list'
category_url = f'www.thecocktaildb.com/api/json/v1/{key}/list.php?g=list'
data_glasses = await Reqs.get(category_url)

l = [glasses['strGlass'] for glasses in data_glasses['drinks']]
Expand All @@ -36,7 +36,7 @@ async def ingredients(key: str = None):
# Returns a list of ingredients

key = key or 1
ingrs_url = 'https://www.thecocktaildb.com/api/json/v1/1/list.php?i=list'
ingrs_url = f'https://www.thecocktaildb.com/api/json/v1/{key}/list.php?i=list'
data_ingrs = await Reqs.get(ingrs_url)

l = [ingrs['strIngredient1'] for ingrs in data_ingrs['drinks']]
Expand Down

0 comments on commit 2813fc0

Please sign in to comment.