glitch-javascript-sdk 3.9.1 → 3.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/hosting-runtime.js +12 -3
- package/dist/browser/hosting-runtime.js.map +1 -1
- package/dist/cjs/index.js +14 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Hosting.d.ts +5 -2
- package/dist/esm/index.js +14 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/Competitions.ts +184 -184
- package/src/api/Hosting.ts +15 -3
- package/src/hosting-runtime.ts +2 -1
- package/src/routes/TitlesRoute.ts +7 -7
package/src/api/Competitions.ts
CHANGED
|
@@ -7,9 +7,9 @@ class Competitions {
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* List all the competitions
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceList
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* @returns promise
|
|
14
14
|
*/
|
|
15
15
|
public static list<T>(params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
@@ -18,11 +18,11 @@ class Competitions {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a new competition
|
|
21
|
-
*
|
|
21
|
+
*
|
|
22
22
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/newResourceStorage
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @param data The date to be passed when creating a competiton.
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @returns Promise
|
|
27
27
|
*/
|
|
28
28
|
public static create<T>(data : object, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
@@ -32,12 +32,12 @@ class Competitions {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Update a competition
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateStorage
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* @param competition_id The id of the competition to update.
|
|
39
39
|
* @param data The data to update.
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* @returns promise
|
|
42
42
|
*/
|
|
43
43
|
public static update<T>(competition_id : string, data : object, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -47,11 +47,11 @@ class Competitions {
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Retrieve the information for a single competition.
|
|
50
|
-
*
|
|
50
|
+
*
|
|
51
51
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/showStorage
|
|
52
|
-
*
|
|
52
|
+
*
|
|
53
53
|
* @param competition_id The id fo the competition to retrieve.
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* @returns promise
|
|
56
56
|
*/
|
|
57
57
|
public static view<T>(competition_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>> {
|
|
@@ -61,9 +61,9 @@ class Competitions {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Deletes a competition.
|
|
64
|
-
*
|
|
64
|
+
*
|
|
65
65
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryStorage
|
|
66
|
-
*
|
|
66
|
+
*
|
|
67
67
|
* @param competition_id The id of the competition to delete.
|
|
68
68
|
* @returns promise
|
|
69
69
|
*/
|
|
@@ -74,11 +74,11 @@ class Competitions {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Add a team
|
|
77
|
-
*
|
|
77
|
+
*
|
|
78
78
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/addTeam
|
|
79
|
-
*
|
|
80
|
-
* @param competition_id
|
|
81
|
-
* @param team_id
|
|
79
|
+
*
|
|
80
|
+
* @param competition_id
|
|
81
|
+
* @param team_id
|
|
82
82
|
* @returns promise
|
|
83
83
|
*/
|
|
84
84
|
public static addTeam<T>(competition_id : string, team_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -87,11 +87,11 @@ class Competitions {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Adds participant
|
|
90
|
-
*
|
|
90
|
+
*
|
|
91
91
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/addParticipant
|
|
92
|
-
*
|
|
93
|
-
* @param competition_id
|
|
94
|
-
* @param user_id
|
|
92
|
+
*
|
|
93
|
+
* @param competition_id
|
|
94
|
+
* @param user_id
|
|
95
95
|
* @returns promise
|
|
96
96
|
*/
|
|
97
97
|
public static addParticipant<T>(competition_id : string, user_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -100,11 +100,11 @@ class Competitions {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Register a team
|
|
103
|
-
*
|
|
103
|
+
*
|
|
104
104
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/registerTeam
|
|
105
|
-
*
|
|
106
|
-
* @param competition_id
|
|
107
|
-
* @param team_id
|
|
105
|
+
*
|
|
106
|
+
* @param competition_id
|
|
107
|
+
* @param team_id
|
|
108
108
|
* @returns promise
|
|
109
109
|
*/
|
|
110
110
|
public static registerTeam<T>(competition_id : string, team_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -113,9 +113,9 @@ class Competitions {
|
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* Register a user
|
|
116
|
-
*
|
|
116
|
+
*
|
|
117
117
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/registerParticipant
|
|
118
|
-
*
|
|
118
|
+
*
|
|
119
119
|
* @param competition_id
|
|
120
120
|
* @returns promise
|
|
121
121
|
*/
|
|
@@ -125,12 +125,12 @@ class Competitions {
|
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* Sync rounds
|
|
128
|
-
*
|
|
128
|
+
*
|
|
129
129
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/syncRounds
|
|
130
|
-
*
|
|
131
|
-
* @param competition_id
|
|
132
|
-
* @param number_of_competitors
|
|
133
|
-
* @param competitors_per_bracket
|
|
130
|
+
*
|
|
131
|
+
* @param competition_id
|
|
132
|
+
* @param number_of_competitors
|
|
133
|
+
* @param competitors_per_bracket
|
|
134
134
|
* @returns promise
|
|
135
135
|
*/
|
|
136
136
|
public static syncRounds<T>(competition_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -139,11 +139,11 @@ class Competitions {
|
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* auto generate team brackets
|
|
142
|
-
*
|
|
142
|
+
*
|
|
143
143
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/autoGenerateTeamBrackets
|
|
144
|
-
*
|
|
145
|
-
* @param competition_id
|
|
146
|
-
* @param round_id
|
|
144
|
+
*
|
|
145
|
+
* @param competition_id
|
|
146
|
+
* @param round_id
|
|
147
147
|
* @returns promise
|
|
148
148
|
*/
|
|
149
149
|
public static autoGenerate<T>(competition_id : string, round_id : number, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -152,10 +152,10 @@ class Competitions {
|
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* auto generate user brackets
|
|
155
|
-
*
|
|
155
|
+
*
|
|
156
156
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/autoGenerateUserBrackets
|
|
157
|
-
*
|
|
158
|
-
* @param competition_id
|
|
157
|
+
*
|
|
158
|
+
* @param competition_id
|
|
159
159
|
* @returns promise
|
|
160
160
|
*/
|
|
161
161
|
public static autoGenerateUserBrackets<T>(competition_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -164,12 +164,12 @@ class Competitions {
|
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* Updates the main image for the event using a File object.
|
|
167
|
-
*
|
|
167
|
+
*
|
|
168
168
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
169
|
-
*
|
|
169
|
+
*
|
|
170
170
|
* @param file The file object to upload.
|
|
171
171
|
* @param data Any additional data to pass along to the upload.
|
|
172
|
-
*
|
|
172
|
+
*
|
|
173
173
|
* @returns promise
|
|
174
174
|
*/
|
|
175
175
|
public static uploadCompetitionMainImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -181,12 +181,12 @@ class Competitions {
|
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Updates the main image for the competition using a Blob.
|
|
184
|
-
*
|
|
184
|
+
*
|
|
185
185
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
186
|
-
*
|
|
186
|
+
*
|
|
187
187
|
* @param blob The blob to upload.
|
|
188
188
|
* @param data Any additional data to pass along to the upload
|
|
189
|
-
*
|
|
189
|
+
*
|
|
190
190
|
* @returns promise
|
|
191
191
|
*/
|
|
192
192
|
public static uploadCompetitionMainImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -198,29 +198,29 @@ class Competitions {
|
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Updates the banner image for the competition using a File object.
|
|
201
|
-
*
|
|
201
|
+
*
|
|
202
202
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
203
|
-
*
|
|
203
|
+
*
|
|
204
204
|
* @param file The file object to upload.
|
|
205
205
|
* @param data Any additional data to pass along to the upload.
|
|
206
|
-
*
|
|
206
|
+
*
|
|
207
207
|
* @returns promise
|
|
208
208
|
*/
|
|
209
209
|
public static uploadCompetitionBannerImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
210
210
|
|
|
211
211
|
let url = CompetitionRoutes.routes.uploadBannerImage.url.replace('{competition_id}', competition_id);
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
return Requests.uploadFile(url, 'image', file, data);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* Updates the banner image for the competition using a Blob.
|
|
218
|
-
*
|
|
218
|
+
*
|
|
219
219
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
220
|
-
*
|
|
220
|
+
*
|
|
221
221
|
* @param blob The blob to upload.
|
|
222
222
|
* @param data Any additional data to pass along to the upload
|
|
223
|
-
*
|
|
223
|
+
*
|
|
224
224
|
* @returns promise
|
|
225
225
|
*/
|
|
226
226
|
public static uploadCompetitionsBannerImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -232,10 +232,10 @@ class Competitions {
|
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
234
|
* Invites
|
|
235
|
-
*
|
|
235
|
+
*
|
|
236
236
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserInviteList
|
|
237
|
-
*
|
|
238
|
-
* @param competition_id
|
|
237
|
+
*
|
|
238
|
+
* @param competition_id
|
|
239
239
|
* @returns promise
|
|
240
240
|
*/
|
|
241
241
|
public static invites<T>(competition_id : string, params?: Record<string, any>) : AxiosPromise<Response<T>>{
|
|
@@ -244,9 +244,9 @@ class Competitions {
|
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
* Sends invite
|
|
247
|
-
*
|
|
247
|
+
*
|
|
248
248
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionSendInvite
|
|
249
|
-
*
|
|
249
|
+
*
|
|
250
250
|
* @param competition_id
|
|
251
251
|
* @returns promise
|
|
252
252
|
*/
|
|
@@ -256,11 +256,11 @@ class Competitions {
|
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
258
|
* Accept invite
|
|
259
|
-
*
|
|
259
|
+
*
|
|
260
260
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionAcceptInvite
|
|
261
|
-
*
|
|
262
|
-
* @param competition_id
|
|
263
|
-
* @param token
|
|
261
|
+
*
|
|
262
|
+
* @param competition_id
|
|
263
|
+
* @param token
|
|
264
264
|
* @returns promise
|
|
265
265
|
*/
|
|
266
266
|
public static acceptInvite<T>(competition_id : string, token : string): AxiosPromise<Response<T>>{
|
|
@@ -269,11 +269,11 @@ class Competitions {
|
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* Round brackets
|
|
272
|
-
*
|
|
272
|
+
*
|
|
273
273
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketList1
|
|
274
|
-
*
|
|
275
|
-
* @param competition_id
|
|
276
|
-
* @param round_id
|
|
274
|
+
*
|
|
275
|
+
* @param competition_id
|
|
276
|
+
* @param round_id
|
|
277
277
|
* @returns promise
|
|
278
278
|
*/
|
|
279
279
|
public static brackets<T>(competition_id : string, round_id : number, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -282,11 +282,11 @@ class Competitions {
|
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
284
|
* Store round brackets
|
|
285
|
-
*
|
|
285
|
+
*
|
|
286
286
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketStorage
|
|
287
|
-
*
|
|
288
|
-
* @param competition_id
|
|
289
|
-
* @param round_id
|
|
287
|
+
*
|
|
288
|
+
* @param competition_id
|
|
289
|
+
* @param round_id
|
|
290
290
|
* @returns promise
|
|
291
291
|
*/
|
|
292
292
|
public static createBracket<T>(competition_id : string, round_id : number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -295,12 +295,12 @@ class Competitions {
|
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
297
|
* Show round bracket
|
|
298
|
-
*
|
|
298
|
+
*
|
|
299
299
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketShow
|
|
300
|
-
*
|
|
301
|
-
* @param competition_id
|
|
302
|
-
* @param round_id
|
|
303
|
-
* @param bracket_id
|
|
300
|
+
*
|
|
301
|
+
* @param competition_id
|
|
302
|
+
* @param round_id
|
|
303
|
+
* @param bracket_id
|
|
304
304
|
* @returns promise
|
|
305
305
|
*/
|
|
306
306
|
public static showBracket<T>(competition_id : string, round_id : number, bracket_id : number, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -309,12 +309,12 @@ class Competitions {
|
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
* Update bracket
|
|
312
|
-
*
|
|
312
|
+
*
|
|
313
313
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateRoundBracket
|
|
314
|
-
*
|
|
315
|
-
* @param competition_id
|
|
316
|
-
* @param round_id
|
|
317
|
-
* @param bracket_id
|
|
314
|
+
*
|
|
315
|
+
* @param competition_id
|
|
316
|
+
* @param round_id
|
|
317
|
+
* @param bracket_id
|
|
318
318
|
* @returns promise
|
|
319
319
|
*/
|
|
320
320
|
public static updateBracket<T>(competition_id : string, round_id : number, bracket_id : number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -323,12 +323,12 @@ class Competitions {
|
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
325
|
* Delete bracket
|
|
326
|
-
*
|
|
326
|
+
*
|
|
327
327
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryRoundBracket
|
|
328
|
-
*
|
|
329
|
-
* @param competition_id
|
|
330
|
-
* @param round_id
|
|
331
|
-
* @param bracket_id
|
|
328
|
+
*
|
|
329
|
+
* @param competition_id
|
|
330
|
+
* @param round_id
|
|
331
|
+
* @param bracket_id
|
|
332
332
|
* @returns promise
|
|
333
333
|
*/
|
|
334
334
|
public static destroyBracket<T>(competition_id : string, round_id : number, bracket_id : number): AxiosPromise<Response<T>>{
|
|
@@ -337,10 +337,10 @@ class Competitions {
|
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* List round
|
|
340
|
-
*
|
|
340
|
+
*
|
|
341
341
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundList
|
|
342
|
-
*
|
|
343
|
-
* @param competition_id
|
|
342
|
+
*
|
|
343
|
+
* @param competition_id
|
|
344
344
|
* @returns promise
|
|
345
345
|
*/
|
|
346
346
|
public static rounds<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -349,10 +349,10 @@ class Competitions {
|
|
|
349
349
|
|
|
350
350
|
/**
|
|
351
351
|
* Create a new round for competition
|
|
352
|
-
*
|
|
352
|
+
*
|
|
353
353
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundStorage
|
|
354
|
-
*
|
|
355
|
-
* @param competition_id
|
|
354
|
+
*
|
|
355
|
+
* @param competition_id
|
|
356
356
|
* @returns promise
|
|
357
357
|
*/
|
|
358
358
|
public static createRound<T>(competition_id : string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -361,11 +361,11 @@ class Competitions {
|
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
363
|
* Retrieve the information for a single round.
|
|
364
|
-
*
|
|
364
|
+
*
|
|
365
365
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundShow
|
|
366
|
-
*
|
|
367
|
-
* @param competition_id
|
|
368
|
-
* @param round_id
|
|
366
|
+
*
|
|
367
|
+
* @param competition_id
|
|
368
|
+
* @param round_id
|
|
369
369
|
* @returns promise
|
|
370
370
|
*/
|
|
371
371
|
public static showRound<T>(competition_id : string, round_id : number, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -374,11 +374,11 @@ class Competitions {
|
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
376
|
* Updating resource in storage with new information.
|
|
377
|
-
*
|
|
377
|
+
*
|
|
378
378
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateRound
|
|
379
|
-
*
|
|
380
|
-
* @param competition_id
|
|
381
|
-
* @param round_id
|
|
379
|
+
*
|
|
380
|
+
* @param competition_id
|
|
381
|
+
* @param round_id
|
|
382
382
|
* @returns promise
|
|
383
383
|
*/
|
|
384
384
|
public static updateRound<T>(competition_id : string, round_id : number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -387,11 +387,11 @@ class Competitions {
|
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* Deletes the round for the competition.
|
|
390
|
-
*
|
|
390
|
+
*
|
|
391
391
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryRound
|
|
392
|
-
*
|
|
393
|
-
* @param competition_id
|
|
394
|
-
* @param round_id
|
|
392
|
+
*
|
|
393
|
+
* @param competition_id
|
|
394
|
+
* @param round_id
|
|
395
395
|
* @returns promise
|
|
396
396
|
*/
|
|
397
397
|
public static destroyRound<T>(competition_id : string, round_id : number): AxiosPromise<Response<T>>{
|
|
@@ -400,10 +400,10 @@ class Competitions {
|
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
402
|
* Retrieve a list of teams associated with the competition.
|
|
403
|
-
*
|
|
403
|
+
*
|
|
404
404
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceCompetitionTeamList
|
|
405
|
-
*
|
|
406
|
-
* @param competition_id
|
|
405
|
+
*
|
|
406
|
+
* @param competition_id
|
|
407
407
|
* @returns promise
|
|
408
408
|
*/
|
|
409
409
|
public static team<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -412,10 +412,10 @@ class Competitions {
|
|
|
412
412
|
|
|
413
413
|
/**
|
|
414
414
|
* Associate a new team with the competition.
|
|
415
|
-
*
|
|
415
|
+
*
|
|
416
416
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceCompetitionTeamStorage
|
|
417
|
-
*
|
|
418
|
-
* @param competition_id
|
|
417
|
+
*
|
|
418
|
+
* @param competition_id
|
|
419
419
|
* @returns promise
|
|
420
420
|
*/
|
|
421
421
|
public static createCompetitionTeam<T>(competition_id : string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -424,9 +424,9 @@ class Competitions {
|
|
|
424
424
|
|
|
425
425
|
/**
|
|
426
426
|
* Display the contents of a single team associated with the competition.
|
|
427
|
-
*
|
|
427
|
+
*
|
|
428
428
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceTeamShow
|
|
429
|
-
*
|
|
429
|
+
*
|
|
430
430
|
* @param competition_id The id of the competition
|
|
431
431
|
* @param team_id The id of the team
|
|
432
432
|
* @returns promise
|
|
@@ -434,14 +434,14 @@ class Competitions {
|
|
|
434
434
|
public static showTeam<T>(competition_id : string, team_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
435
435
|
return Requests.processRoute(CompetitionRoutes.routes.showTeam, {}, {team_id : team_id, competition_id : competition_id});
|
|
436
436
|
}
|
|
437
|
-
|
|
437
|
+
|
|
438
438
|
/**
|
|
439
439
|
* Update the team information associated with the competition.
|
|
440
|
-
*
|
|
440
|
+
*
|
|
441
441
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateTeam
|
|
442
|
-
*
|
|
443
|
-
* @param competition_id
|
|
444
|
-
* @param team_id
|
|
442
|
+
*
|
|
443
|
+
* @param competition_id
|
|
444
|
+
* @param team_id
|
|
445
445
|
* @returns promise
|
|
446
446
|
*/
|
|
447
447
|
public static updateTeam<T>(competition_id : string, team_id : string, data?: object): AxiosPromise<Response<T>>{
|
|
@@ -450,11 +450,11 @@ class Competitions {
|
|
|
450
450
|
|
|
451
451
|
/**
|
|
452
452
|
* Removes the team from the competition.
|
|
453
|
-
*
|
|
453
|
+
*
|
|
454
454
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryTeam
|
|
455
|
-
*
|
|
456
|
-
* @param competition_id
|
|
457
|
-
* @param team_id
|
|
455
|
+
*
|
|
456
|
+
* @param competition_id
|
|
457
|
+
* @param team_id
|
|
458
458
|
* @returns promise
|
|
459
459
|
*/
|
|
460
460
|
public static destroyTeam<T>(competition_id : string, team_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -463,10 +463,10 @@ class Competitions {
|
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
465
|
* List all the users associated with a competition.
|
|
466
|
-
*
|
|
466
|
+
*
|
|
467
467
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserList
|
|
468
|
-
*
|
|
469
|
-
* @param competition_id
|
|
468
|
+
*
|
|
469
|
+
* @param competition_id
|
|
470
470
|
* @returns promise
|
|
471
471
|
*/
|
|
472
472
|
public static users<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -475,10 +475,10 @@ class Competitions {
|
|
|
475
475
|
|
|
476
476
|
/**
|
|
477
477
|
* Associate a new users with the competition.
|
|
478
|
-
*
|
|
478
|
+
*
|
|
479
479
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/createCompetitionUser
|
|
480
|
-
*
|
|
481
|
-
* @param competition_id
|
|
480
|
+
*
|
|
481
|
+
* @param competition_id
|
|
482
482
|
* @returns promise
|
|
483
483
|
*/
|
|
484
484
|
public static createCompetitionUser<T>(competition_id : string, data?: object): AxiosPromise<Response<T>>{
|
|
@@ -487,11 +487,11 @@ class Competitions {
|
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
489
|
* Show a single user by its ID.
|
|
490
|
-
*
|
|
490
|
+
*
|
|
491
491
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/showCompetitionUser
|
|
492
|
-
*
|
|
493
|
-
* @param competition_id
|
|
494
|
-
* @param user_id
|
|
492
|
+
*
|
|
493
|
+
* @param competition_id
|
|
494
|
+
* @param user_id
|
|
495
495
|
* @returns promise
|
|
496
496
|
*/
|
|
497
497
|
public static showCompetitionUser<T>(competition_id : string, user_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -500,11 +500,11 @@ class Competitions {
|
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
* Update the user associated with competition.
|
|
503
|
-
*
|
|
503
|
+
*
|
|
504
504
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateCompetitionUser
|
|
505
|
-
*
|
|
506
|
-
* @param competition_id
|
|
507
|
-
* @param user_id
|
|
505
|
+
*
|
|
506
|
+
* @param competition_id
|
|
507
|
+
* @param user_id
|
|
508
508
|
* @returns promise
|
|
509
509
|
*/
|
|
510
510
|
public static updateCompetitionUser<T>(competition_id : string, user_id : string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -513,61 +513,61 @@ class Competitions {
|
|
|
513
513
|
|
|
514
514
|
/**
|
|
515
515
|
* Remove the associated user from the competition.
|
|
516
|
-
*
|
|
516
|
+
*
|
|
517
517
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/removeCompetitionUser
|
|
518
|
-
*
|
|
519
|
-
* @param competition_id
|
|
520
|
-
* @param user_id
|
|
518
|
+
*
|
|
519
|
+
* @param competition_id
|
|
520
|
+
* @param user_id
|
|
521
521
|
* @returns promise
|
|
522
522
|
*/
|
|
523
523
|
public static destroyCompetitionUser<T>(competition_id : string, user_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
524
524
|
return Requests.processRoute(CompetitionRoutes.routes.destroyCompetitionUser, {}, {user_id : user_id, competition_id : competition_id});
|
|
525
|
-
}
|
|
526
|
-
|
|
525
|
+
}
|
|
526
|
+
|
|
527
527
|
/**
|
|
528
528
|
* List all the venues associated with a competition.
|
|
529
|
-
*
|
|
529
|
+
*
|
|
530
530
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/venueList
|
|
531
|
-
*
|
|
532
|
-
* @param competition_id
|
|
531
|
+
*
|
|
532
|
+
* @param competition_id
|
|
533
533
|
* @returns promise
|
|
534
534
|
*/
|
|
535
535
|
public static venues<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
536
536
|
return Requests.processRoute(CompetitionRoutes.routes.venues, {}, {competition_id : competition_id});
|
|
537
|
-
}
|
|
537
|
+
}
|
|
538
538
|
|
|
539
539
|
/**
|
|
540
540
|
* Creating a new venue.
|
|
541
|
-
*
|
|
541
|
+
*
|
|
542
542
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/createVenue
|
|
543
|
-
*
|
|
544
|
-
* @param competition_id
|
|
543
|
+
*
|
|
544
|
+
* @param competition_id
|
|
545
545
|
* @returns promise
|
|
546
546
|
*/
|
|
547
547
|
public static createVenue<T>(competition_id : string, data : object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
548
548
|
return Requests.processRoute(CompetitionRoutes.routes.newVenue, data, {competition_id : competition_id});
|
|
549
|
-
}
|
|
549
|
+
}
|
|
550
550
|
|
|
551
551
|
/**
|
|
552
552
|
* Show a single venue by its ID.
|
|
553
|
-
*
|
|
553
|
+
*
|
|
554
554
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/showVenue
|
|
555
|
-
*
|
|
556
|
-
* @param competition_id
|
|
557
|
-
* @param venue_id
|
|
555
|
+
*
|
|
556
|
+
* @param competition_id
|
|
557
|
+
* @param venue_id
|
|
558
558
|
* @returns promise
|
|
559
559
|
*/
|
|
560
560
|
public static showVenue<T>(competition_id : string, venue_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
561
561
|
return Requests.processRoute(CompetitionRoutes.routes.showVenue, {}, {venue_id : venue_id, competition_id : competition_id});
|
|
562
|
-
}
|
|
562
|
+
}
|
|
563
563
|
|
|
564
564
|
/**
|
|
565
565
|
* Update the venue.
|
|
566
|
-
*
|
|
566
|
+
*
|
|
567
567
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateVenue
|
|
568
|
-
*
|
|
569
|
-
* @param competition_id
|
|
570
|
-
* @param venue_id
|
|
568
|
+
*
|
|
569
|
+
* @param competition_id
|
|
570
|
+
* @param venue_id
|
|
571
571
|
* @returns promise
|
|
572
572
|
*/
|
|
573
573
|
public static updateVenue<T>(competition_id : string, venue_id : string, data : object, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -576,11 +576,11 @@ class Competitions {
|
|
|
576
576
|
|
|
577
577
|
/**
|
|
578
578
|
* Deletes the venue from the competition.
|
|
579
|
-
*
|
|
579
|
+
*
|
|
580
580
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/removeCompetitionVenue
|
|
581
|
-
*
|
|
582
|
-
* @param competition_id
|
|
583
|
-
* @param venue_id
|
|
581
|
+
*
|
|
582
|
+
* @param competition_id
|
|
583
|
+
* @param venue_id
|
|
584
584
|
* @returns promise
|
|
585
585
|
*/
|
|
586
586
|
public static destroyVenue<T>(competition_id : string, venue_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -589,12 +589,12 @@ class Competitions {
|
|
|
589
589
|
|
|
590
590
|
/**
|
|
591
591
|
* Updates the main image for the venue using a File object.
|
|
592
|
-
*
|
|
592
|
+
*
|
|
593
593
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
594
|
-
*
|
|
594
|
+
*
|
|
595
595
|
* @param file The file object to upload.
|
|
596
596
|
* @param data Any additional data to pass along to the upload.
|
|
597
|
-
*
|
|
597
|
+
*
|
|
598
598
|
* @returns promise
|
|
599
599
|
*/
|
|
600
600
|
public static uploadVenueMainImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -606,12 +606,12 @@ class Competitions {
|
|
|
606
606
|
|
|
607
607
|
/**
|
|
608
608
|
* Updates the main image for the venue using a Blob.
|
|
609
|
-
*
|
|
609
|
+
*
|
|
610
610
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
611
|
-
*
|
|
611
|
+
*
|
|
612
612
|
* @param blob The blob to upload.
|
|
613
613
|
* @param data Any additional data to pass along to the upload
|
|
614
|
-
*
|
|
614
|
+
*
|
|
615
615
|
* @returns promise
|
|
616
616
|
*/
|
|
617
617
|
public static uploadVenueMainImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
@@ -623,10 +623,10 @@ class Competitions {
|
|
|
623
623
|
|
|
624
624
|
/**
|
|
625
625
|
* Get a leaderboard by a users points.
|
|
626
|
-
*
|
|
626
|
+
*
|
|
627
627
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserList
|
|
628
|
-
*
|
|
629
|
-
* @param competition_id
|
|
628
|
+
*
|
|
629
|
+
* @param competition_id
|
|
630
630
|
* @returns promise
|
|
631
631
|
*/
|
|
632
632
|
public static userPointsLeaderboard<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -635,10 +635,10 @@ class Competitions {
|
|
|
635
635
|
|
|
636
636
|
/**
|
|
637
637
|
* Get a leaderboard by a users wins.
|
|
638
|
-
*
|
|
638
|
+
*
|
|
639
639
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardUserWins
|
|
640
|
-
*
|
|
641
|
-
* @param competition_id
|
|
640
|
+
*
|
|
641
|
+
* @param competition_id
|
|
642
642
|
* @returns promise
|
|
643
643
|
*/
|
|
644
644
|
public static userWinsLeaderboard<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -647,10 +647,10 @@ class Competitions {
|
|
|
647
647
|
|
|
648
648
|
/**
|
|
649
649
|
* Get a leaderboard by a teams points.
|
|
650
|
-
*
|
|
650
|
+
*
|
|
651
651
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserList
|
|
652
|
-
*
|
|
653
|
-
* @param competition_id
|
|
652
|
+
*
|
|
653
|
+
* @param competition_id
|
|
654
654
|
* @returns promise
|
|
655
655
|
*/
|
|
656
656
|
public static teamPointsLeaderboard<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -659,10 +659,10 @@ class Competitions {
|
|
|
659
659
|
|
|
660
660
|
/**
|
|
661
661
|
* Get a leaderboard by a teams wins.
|
|
662
|
-
*
|
|
662
|
+
*
|
|
663
663
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardTeamWins
|
|
664
|
-
*
|
|
665
|
-
* @param competition_id
|
|
664
|
+
*
|
|
665
|
+
* @param competition_id
|
|
666
666
|
* @returns promise
|
|
667
667
|
*/
|
|
668
668
|
public static teamWinsLeaderboard<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -671,10 +671,10 @@ class Competitions {
|
|
|
671
671
|
|
|
672
672
|
/**
|
|
673
673
|
* Get all leaderboards.
|
|
674
|
-
*
|
|
674
|
+
*
|
|
675
675
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardTeamPoints
|
|
676
|
-
*
|
|
677
|
-
* @param competition_id
|
|
676
|
+
*
|
|
677
|
+
* @param competition_id
|
|
678
678
|
* @returns promise
|
|
679
679
|
*/
|
|
680
680
|
public static allLeaderboards<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
@@ -683,10 +683,10 @@ class Competitions {
|
|
|
683
683
|
|
|
684
684
|
/**
|
|
685
685
|
* Gets all the information about a competition for the current user.
|
|
686
|
-
*
|
|
686
|
+
*
|
|
687
687
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderboardsAll
|
|
688
|
-
*
|
|
689
|
-
* @param competition_id
|
|
688
|
+
*
|
|
689
|
+
* @param competition_id
|
|
690
690
|
* @returns promise
|
|
691
691
|
*/
|
|
692
692
|
public static me<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|