-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathindex.html
More file actions
180 lines (178 loc) · 4.36 KB
/
index.html
File metadata and controls
180 lines (178 loc) · 4.36 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td,
th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
<h2>Available Routes</h2>
<table>
<tr>
<th>TYPE</th>
<th>ROUTE</th>
<th>INPUT</th>
<th>OUTPUT</th>
<th>DESCRIPTION</th>
</tr>
<tr>
<td rowspan="2">LOGIN</td>
<td>[POST]/api/password/forget</td>
<td>{email:''}</td>
<td>{info:'',msg:'',token:''}</td>
<th>Accepts email and send user an email with link and returns reset token</th>
</tr>
<tr>
<td>[POST]/api/password/reset</td>
<td>{email:'',token:'',password:''}</td>
<td>{user:'',msg:''}</td>
<th>Accepts email, token and password and return user and msg after reseting the passwrd</th>
</tr>
<tr>
<td>REGISTER</td>
<td>[POST]/api/register</td>
<td>{name:'',email:'',password:''}</td>
<td>{token:''}</td>
<th>Accepts name,email and password and return json token</th>
</tr>
<tr>
<td rowspan="2">LOGIN</td>
<td>[POST]/api/login</td>
<td>{email:'',password:''}</td>
<td>{token:''}</td>
<th>Accepts email and password and return json token</th>
</tr>
<tr>
<td>[GET]/api/login</td>
<td>[header]x-auth-token:''</td>
<td>{userModel}</td>
<th>Accepts token as header and returns the user data</th>
</tr>
<tr>
<td rowspan="3">CONTACT US</td>
<td>[POST]/api/contact</td>
<td>{email:'',name:'',contact:'',query:''}</td>
<td>{msg:''}</td>
<th>
Accepts email,contact,name,query and return the error or success
message
</th>
</tr>
<tr>
<td>[DELETE]/api/contact</td>
<td>[header]x-auth-token:''</td>
<td>{msg:''}</td>
<th>
Accepts token(with admin access) as header and returns error or
success message
</th>
</tr>
<tr>
<td>[GET]/api/contact</td>
<td>[header]x-auth-token:''</td>
<td>[contactModel]</td>
<th>
Accepts token(with admin access) as header and returns array of
contactModel
</th>
</tr>
<!-- Events -->
<tr>
<td rowspan="6">Events</td>
<td>[GET]/api/events</td>
<td>{}</td>
<td>{List of events}</td>
<th>
Accepts nothing and returns the list of events or error
</th>
</tr>
<tr>
<td>[GET]/api/events/:eventId</td>
<td>{}</td>
<td>{Details of a specific event}</td>
<th>
Accepts eventId as a url parameter and returns specific event details
or error message.
</th>
</tr>
<tr>
<td>[GET]/api/events/participants/:eventId</td>
<td>{}</td>
<td>{[Array of participants of spefific event]}</td>
<th>
Accepts eventId as url parameter and returns an Array of Participants
or error message.
</th>
</tr>
<tr>
<td>[POST]/api/events/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success or
error message.
</th>
</tr>
<tr>
<td>[PUT]/api/events/register/:eventId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
[User Event Registration] Accepts token as header and returns
successful registration or error message.
</th>
</tr>
<tr>
<td>[DELETE]/api/events/delete/:eventId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
event is deleted or error message.
</th>
</tr>
<!-- Groups -->
<tr>
<td rowspan="3">Groups</td>
<td>[GET]/api/groups</td>
<td>{}</td>
<td>{List of available groups}</td>
<th>
Accepts nothing and returns list of groups with details or error
message.
</th>
</tr>
<tr>
<td>[POST]/api/groups/add</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
group is added or error message.
</th>
</tr>
<tr>
<td>[DELETE]/api/groups/delete/:groupId</td>
<td>{[header]x-auth-token:' '}</td>
<td>{msg:' '}</td>
<th>
Accepts token(with admin access) as header and returns success if
group is deleted or error message.
</th>
</tr>
</table>
</body>
</html>