File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 22import datetime
33import os
44
5- # nutritionix
5+ # NUTRITIONIX
66APP_ID = os .environ .get ("APP_ID" , "APP ID it doesn't exist" )
77API_KEY = os .environ .get ("API_KEY" , "API_KEY it doesn't exist" )
88
1313 "x-app-key" : API_KEY
1414}
1515
16- user_input = input ("Which exercise you did?" )
16+ user_input = input ("Which exercise you did? " )
1717
1818data = {
1919 "query" : user_input
2727 print (f"Error in the request. Status code: { response_nutritionix .status_code } " )
2828 print (response_nutritionix .text )
2929
30- # sheety
31- url = ""
30+ # SHEETY
31+ SHEETY_API_URL = "https://api.sheety.co/-------------/workoutTracking/workouts"
32+
3233headers = {
33- " Authorization" : ""
34+ ' Authorization' : f'Basic ---------'
3435}
3536
36- response_sheety = requests .post ()
37-
37+ # Mock data
38+ data = {
39+ "workout" : {
40+ "date" : "28/07/2020" ,
41+ "time" : "10:00:00" ,
42+ "exercise" : "Yoga" ,
43+ "duration" : 60 ,
44+ "calories" : 200
45+ }
46+ }
3847
39- # Saving data into google sheets
48+ response = requests . post ( SHEETY_API_URL , json = data , headers = headers )
You can’t perform that action at this time.
0 commit comments