-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_data.json
308 lines (308 loc) · 8.43 KB
/
api_data.json
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
[
{
"type": "get",
"url": "/",
"title": "Ping",
"group": "General",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "string",
"optional": false,
"field": "Message",
"description": "<p>Current status of the API. Should return either "OK" or an error message</p>"
}
]
},
"examples": [
{
"title": "Success",
"content": "{\n message: \"OK\"\n}",
"type": "json"
}
]
},
"sampleRequest": [
{
"url": "https://narwhalapi.theshadow.xyz/"
}
],
"version": "0.0.0",
"filename": "src/index.js",
"groupTitle": "General",
"name": "Get"
},
{
"type": "get",
"url": "/giveaway",
"title": "All Giveaways",
"name": "All_Giveaways",
"group": "Giveaways",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "giveaways",
"description": "<p>All the currently active giveaways</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "giveaways.id",
"description": "<p>ID of the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "giveaways.prize",
"description": "<p>Prize for the giveaway</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "giveaways.endsAt",
"description": "<p>Timestamp of the giveaway ending</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "giveaways.prizeType",
"description": "<p>Type of giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "giveaways.mod",
"description": "<p>ID of the user who created the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "giveaways.time",
"description": "<p>Time in milliseconds of the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "fetchedAt",
"description": "<p>Date this data was fetched at</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": " HTTP/1.1 200 OK\n {\n giveaways: [\n {\n id: '12345',\n prize: 'A prize',\n endsAt: 123456789,\n prizeType: 'type',\n mod: '12345',\n time: 123456789,\n },\n { \n id: '12345',\n prize: 'A prize',\n endsAt: 123456789,\n prizeType: 'type',\n mod: '12345',\n time: 123456789,\n }\n ],\n fetchedAt: '2020-01-01T00:00:00.000Z'\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "src/routes/giveaway.js",
"groupTitle": "Giveaways",
"sampleRequest": [
{
"url": "https://narwhalapi.theshadow.xyz/giveaway"
}
]
},
{
"type": "get",
"url": "/giveaway/:id",
"title": "Get a giveaway",
"name": "Get_a_giveaway",
"group": "Giveaways",
"parameter": {
"fields": {
"Parameter": [
{
"group": "Parameter",
"type": "String",
"optional": false,
"field": "id",
"description": "<p>ID of the giveaway</p>"
}
]
}
},
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Object",
"optional": false,
"field": "data",
"description": "<p>The giveaway's data</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "data.id",
"description": "<p>ID of the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "data.prize",
"description": "<p>Prize for the giveaway</p>"
},
{
"group": "Success 200",
"type": "Number",
"optional": false,
"field": "data.endsAt",
"description": "<p>Timestamp of the giveaway ending</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "data.prizeType",
"description": "<p>Type of giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "data.mod",
"description": "<p>ID of the user who created the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "data.time",
"description": "<p>Time in milliseconds of the giveaway</p>"
},
{
"group": "Success 200",
"type": "String",
"optional": false,
"field": "fetchedAt",
"description": "<p>Date this data was fetched at</p>"
}
]
},
"examples": [
{
"title": "Success-Response:",
"content": " HTTP/1.1 200 OK\n {\n data: {\n id: '12345',\n prize: 'A prize',\n endsAt: 123456789,\n prizeType: 'type',\n mod: '12345',\n time: 123456789,\n },\n fetchedAt: '2020-01-01T00:00:00.000Z'\n}",
"type": "json"
}
]
},
"error": {
"fields": {
"Error 4xx": [
{
"group": "Error 4xx",
"type": "String",
"optional": false,
"field": "error",
"description": "<p>The error message</p>"
}
]
},
"examples": [
{
"title": "Error-Response:",
"content": "HTTP/1.1 404 Not Found\n{\n \"error\": \"Giveaway not found\"\n}",
"type": "json"
}
]
},
"version": "0.0.0",
"filename": "src/routes/giveaway.js",
"groupTitle": "Giveaways",
"sampleRequest": [
{
"url": "https://narwhalapi.theshadow.xyz/giveaway/:id"
}
]
},
{
"type": "get",
"url": "/stats",
"title": "Bot Stats",
"name": "Bot_Stats",
"group": "Stats",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "number",
"optional": false,
"field": "guilds",
"description": "<p>The current guild count</p>"
},
{
"group": "Success 200",
"type": "number",
"optional": false,
"field": "users",
"description": "<p>The current user count</p>"
}
]
}
},
"version": "0.0.0",
"filename": "src/routes/stats.js",
"groupTitle": "Stats",
"sampleRequest": [
{
"url": "https://narwhalapi.theshadow.xyz/stats"
}
]
},
{
"type": "get",
"url": "/status",
"title": "Process Status",
"name": "Process_Status",
"group": "Stats",
"success": {
"fields": {
"Success 200": [
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "discord",
"description": "<p>The statuses from Discord</p>"
},
{
"group": "Success 200",
"type": "Object[]",
"optional": false,
"field": "process",
"description": "<p>The statuses from the process manager</p>"
}
]
}
},
"version": "0.0.0",
"filename": "src/routes/stats.js",
"groupTitle": "Stats",
"sampleRequest": [
{
"url": "https://narwhalapi.theshadow.xyz/status"
}
]
}
]