-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathintraLink.ts
76 lines (50 loc) · 1.9 KB
/
intraLink.ts
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
const PROFILE_BASE = "https://profile.intra.42.fr";
const PROJECTS_BASE = "https://projects.intra.42.fr";
// USER
export function getUserLink(query) {
return PROFILE_BASE + "/users/" + query.login;
}
export function getUserQuestsLink(query) {
return PROFILE_BASE + "/users/" + query.login + "/quests";
}
export function getUserAchievementsLink(query) {
return PROFILE_BASE + "/users/" + query.login + "/achievements";
}
// https://profile.intra.42.fr/users/lrocca/correction_point_historics
// https://projects.intra.42.fr/projects/graph?login=lrocca
// https://projects.intra.42.fr/users/lrocca/feedbacks
// https://profile.intra.42.fr/users/lrocca/experiences/cursus_id/21
// PROJECT
export function getProjectLink(query) {
return PROJECTS_BASE + "/projects/" + query.slug;
}
// PROJECT USER
export function getUserProjectLink(query) {
return PROJECTS_BASE + "/" + query.project + "/" + query.login;
}
// COALITIONS
// https://profile.intra.42.fr/blocs/35/coalitions/126
// https://profile.intra.42.fr/blocs/35/coalitions
// https://profile.intra.42.fr/blocs/35/scores
// https://profile.intra.42.fr/blocs/35/coalitions/void/scores
// SETTINGS
// https://profile.intra.42.fr/users/lrocca/edit
// https://profile.intra.42.fr/gitlab_users
// https://profile.intra.42.fr/languages
// https://profile.intra.42.fr/mails
// https://profile.intra.42.fr/securities
// https://profile.intra.42.fr/expertises_users
// https://profile.intra.42.fr/anti_grav_units_users/new
// EVENTS
export function getEventLink(query) {
return PROFILE_BASE + "/events/" + query.id;
}
// https://profile.intra.42.fr/events/12228/feedbacks
// https://profile.intra.42.fr/events
// https://profile.intra.42.fr/events/marks
// APPLICATION
// https://profile.intra.42.fr/oauth/applications
export function getAppLink(query) {
return PROFILE_BASE + "/oauth/applications/" + query.id;
}
// https://profile.intra.42.fr/oauth/applications/5406/edit