-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
94 lines (79 loc) · 2.6 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
CLARIFAI_API_KEY = "e27baccbdfb4460494a83b54dadaaf9a"
CALORIES_API_KEY = "840ff1e8"
CALORIES_API_ID = "21f54da4361088ddca9e38c196cb87e0"
RECIPE_API_KEY = "c006a47b2aa749eb92a5b449de19cab4"
FB_TOKEN = "EAAEtROZBcc64BAJcWyblClEZAEIAIGIw3O4npXZCawXUX8wBMzzbz3DiCtFec44gEwJfKyJFB5JXbydyJb5ZCeJjpQ7Sc4FdddthSheZBuiukt5F3sllhLxS3HdLKoCpZAeax7XC3WIbQcdApt9tDxZCy3zOaZC3OW4yzVgWfPuUPgZDZD"
CALORIES_DEFAULT = 2600
SIGN_UP = "https://nullptr.chat/signup"
MENU = "https://nullptr.chat/recipe"
chatinfo = {"userid": "",
"chatid": ""
}
recipeInfo = {"restriction":"",
"maxCalories":""
}
#### MONGO DB
MONGO_HOST = 'localhost:27017'
MONGO_USER = 'admin'
MONGO_PASSWORD = 'password'
#### DIET GOALS
MAINTAIN = 0
LOSE = 1
GAIN = 2
#### NUTRITIONIX food to calories API
NUTRITIONIX_URL="https://trackapi.nutritionix.com/v2/natural/nutrients"
NUTRITIONIX_APP_ID="9ee1d833"
NUTRITIONIX_APP_KEY="460fa637c6bf310caefd273c5151edcd"
#### NUTRITIONIX sport to calories API
NUTRITIONIX_SPORT_URL="https://trackapi.nutritionix.com/v2/natural/exercise"
NUTRITIONIX_SPORT_APP_ID="4ea82404"
NUTRITIONIX_SPORT_APP_KEY="78cfb09ac9b98b5f174989c32276b5d9"
#### USER MENU
json_menu = {
"messaging_type": "RESPONSE",
"recipient": {
"id": chatinfo['userid']
},
"message": {
"text": "Welcome to HealthBot! What would you like to do?",
"quick_replies": [
{
"content_type": "text",
"title": "Get meal calories",
"payload": "Get meal calories"
},
{
"content_type": "text",
"title": "Get a menu",
"payload": "Get a menu"
},
{
"content_type": "text",
"title": "Sport activities",
"payload": "Sport activities"
},
{
"content_type": "text",
"title": "Edit user's details",
"payload": "Edit user's details"
},
{
"content_type": "text",
"title": "Get today's status",
"payload": "Get today's status"
}
]
}
}
def quick_replies(title, options):
quick_replies_json = {"fulfillmentMessages": [
{
"quickReplies": {
"title": title,
"quickReplies": options
},
"platform": "FACEBOOK",
"lang": "en"
}]
}
return quick_replies_json