Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
Updated API headers and params
  • Loading branch information
DYNAMICMORTAL authored Jul 20, 2023
1 parent ca0635c commit 4856107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
# server = ctx.message.server

def get_quote():
response = requests.get(api_url, headers={'X-Api-Key': 'Q/pZ1T9NGmCJcZPkCTxOyw==w8e1XgQNRx1gON2F'})
response = requests.get(api_url, headers={'X-Api-Key': 'os.environ['api']'})
json_data = json.loads(response.text)
quote = json_data[0]["quote"] + " - " + json_data[0]["author"]
return quote

def get_nutrition(query):
api_url2 = api_base_url + query
response = requests.get(api_url2, headers={'X-Api-Key': 'Q/pZ1T9NGmCJcZPkCTxOyw==w8e1XgQNRx1gON2F'})
response = requests.get(api_url2, headers={'X-Api-Key': 'os.environ['nutritionAPI']'})
json_data = json.loads(response.text)
try:
calories = str(json_data[0]["calories"]) + " - CALORIES"
Expand Down

0 comments on commit 4856107

Please sign in to comment.