forked from kevin-connell/BetterMe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
108 lines (78 loc) · 2.64 KB
/
Copy pathscript.js
File metadata and controls
108 lines (78 loc) · 2.64 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
$(document).ready(function () {
$(".dropdown-trigger").dropdown();
var favorites = JSON.parse(localStorage.getItem("favoritesList")) || ["Chicken", "Mashed Potatoes" , "Pea Soup"]
renderFavorites();
function renderFavorites() {
$("#dropdown1").empty()
for (let i = 0; i < favorites.length; i++) {
newLi = $("<li>")
newAtag = $("<a>")
$(newAtag).text(favorites[i])
$(newLi).append(newAtag)
$("#dropdown1").append(newLi)
}
}
$("#dropdown1").on("click" , function (event){
console.log($(event.target).text())
localStorage.setItem("clickedFavorite" , $(event.target).text())
window.location.href = "recipe-card.html"
})
function generateRecipes() {
var queryURL = ""
$.ajax({
url: queryURL,
method: "GET"
}).then(function (response) {
console.log(response);
});
}
function GetInfoWorkout() {
var queryURL = "https://wger.de/api/v2/exercise/" + exerciseID;
$.ajax({
url: queryURL,
method: "GET"
}).then(function (response) {
console.log(response);
});
};
// GetInfoWorkout();
});
// GetInfoWorkout();
// ID numbers
// Sedentary workouts:
// 470 - ("Crossover Reverse Lunge")
// 607 - ("name": "Ankle Taps")
// 604 - ("name": "Bodyweight Squats")
// 307 - ("name": "Bear Walk")
// 480 - ("name": "Fire Hydrant")
// Moderate workouts:
// 795 - ("name": "Squat Thrust")
// 548 - ("name": "Wall Slides")
// 341 - ("name": "Body-Ups")
// 781 - ("name": "Dips")
// 806 - ("name": "Cycling")
// Active workouts:
// 814 - ("name": "Box Jump")
// 206 - ("name": "Decline Pushups")
// 338 - ("name": "Isometric Wipers")
// 789 - ("name": "Jogging")
// 807 - (name": "Handstand Pushup")
// GetInfoWorkout();
// Muscles: ID numbers for muscles
// 1 - Biceps brachii
// 2 - Anterior deltoid
// 3 - Serratus anterior
// 4 - Pectoralis major
// 5 - Triceps brachii
// 6 - Rectus abdominis
// 7 - Gastrocnemius
// 8 - Gluteus maximus
// 9 - Trapezius
// 10 - Quadriceps femoris
// 11 - Biceps femoris
// 12 - Latissimus dorsi
// 13 - Brachialis
// 14 - Obliquus externus abdominis
// 15 - Soleus
// "https://wger.de/api/v2/exercise/?equipment=7"
// "https://wger.de/api/v2/exercise/?muscles=1&equipment=7&language=2"