glitch-javascript-sdk 0.0.3 → 0.0.6
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/cjs/index.js +0 -15714
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Competitions.d.ts +372 -0
- package/dist/esm/api/Events.d.ts +205 -0
- package/dist/esm/api/Teams.d.ts +179 -0
- package/dist/esm/api/Users.d.ts +53 -0
- package/dist/esm/api/Waitlist.d.ts +53 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +7 -5
- package/dist/esm/index.js +0 -29938
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/RecordingRoute.d.ts +7 -0
- package/dist/esm/routes/TeamsRoute.d.ts +7 -0
- package/dist/esm/routes/WaitlistRoutes.d.ts +7 -0
- package/dist/esm/util/Requests.d.ts +5 -1
- package/dist/index.d.ts +813 -5
- package/package.json +2 -6
- package/src/api/Competitions.ts +483 -0
- package/src/api/Events.ts +306 -8
- package/src/api/Teams.ts +256 -0
- package/src/api/Users.ts +74 -0
- package/src/api/Waitlist.ts +78 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +7 -5
- package/src/routes/CompetitionRoute.ts +39 -0
- package/src/routes/EventsRoute.ts +18 -16
- package/src/routes/RecordingRoute.ts +16 -0
- package/src/routes/TeamsRoute.ts +26 -0
- package/src/routes/UserRoutes.ts +1 -1
- package/src/routes/WaitlistRoutes.ts +16 -0
- package/src/util/Requests.ts +54 -7
|
@@ -49,5 +49,377 @@ declare class Competitions {
|
|
|
49
49
|
* @returns promise
|
|
50
50
|
*/
|
|
51
51
|
static delete<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Add a team
|
|
54
|
+
*
|
|
55
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/addTeam
|
|
56
|
+
*
|
|
57
|
+
* @param competition_id
|
|
58
|
+
* @param team_id
|
|
59
|
+
* @returns promise
|
|
60
|
+
*/
|
|
61
|
+
static addTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
62
|
+
/**
|
|
63
|
+
* Adds participant
|
|
64
|
+
*
|
|
65
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/addParticipant
|
|
66
|
+
*
|
|
67
|
+
* @param competition_id
|
|
68
|
+
* @param user_id
|
|
69
|
+
* @returns promise
|
|
70
|
+
*/
|
|
71
|
+
static addParticipant<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
72
|
+
/**
|
|
73
|
+
* Register a team
|
|
74
|
+
*
|
|
75
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/registerTeam
|
|
76
|
+
*
|
|
77
|
+
* @param competition_id
|
|
78
|
+
* @param team_id
|
|
79
|
+
* @returns promise
|
|
80
|
+
*/
|
|
81
|
+
static registerTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
82
|
+
/**
|
|
83
|
+
* Register a user
|
|
84
|
+
*
|
|
85
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/registerParticipant
|
|
86
|
+
*
|
|
87
|
+
* @param competition_id
|
|
88
|
+
* @returns promise
|
|
89
|
+
*/
|
|
90
|
+
static registerUser<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
91
|
+
/**
|
|
92
|
+
* Sync rounds
|
|
93
|
+
*
|
|
94
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/syncRounds
|
|
95
|
+
*
|
|
96
|
+
* @param competition_id
|
|
97
|
+
* @param number_of_competitors
|
|
98
|
+
* @param competitors_per_bracket
|
|
99
|
+
* @returns promise
|
|
100
|
+
*/
|
|
101
|
+
static syncRounds<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
102
|
+
/**
|
|
103
|
+
* auto generate team brackets
|
|
104
|
+
*
|
|
105
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/autoGenerateTeamBrackets
|
|
106
|
+
*
|
|
107
|
+
* @param competition_id
|
|
108
|
+
* @param round_id
|
|
109
|
+
* @returns promise
|
|
110
|
+
*/
|
|
111
|
+
static autoGenerate<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
112
|
+
/**
|
|
113
|
+
* auto generate user brackets
|
|
114
|
+
*
|
|
115
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/autoGenerateUserBrackets
|
|
116
|
+
*
|
|
117
|
+
* @param competition_id
|
|
118
|
+
* @returns promise
|
|
119
|
+
*/
|
|
120
|
+
static autoGenerateUserBrackets<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
121
|
+
/**
|
|
122
|
+
* Upload main image
|
|
123
|
+
*
|
|
124
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
125
|
+
*
|
|
126
|
+
* @param competition_id
|
|
127
|
+
* @param image
|
|
128
|
+
* @returns promise
|
|
129
|
+
*/
|
|
130
|
+
static uploadMainImage<T>(competition_id: string, image: string): AxiosPromise<Response<T>>;
|
|
131
|
+
/**
|
|
132
|
+
* Upload banner image
|
|
133
|
+
*
|
|
134
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
135
|
+
*
|
|
136
|
+
* @param competition_id
|
|
137
|
+
* @param image
|
|
138
|
+
* @returns promise
|
|
139
|
+
*/
|
|
140
|
+
static uploadBannerImage<T>(competition_id: string, image: string): AxiosPromise<Response<T>>;
|
|
141
|
+
/**
|
|
142
|
+
* Invites
|
|
143
|
+
*
|
|
144
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserInviteList
|
|
145
|
+
*
|
|
146
|
+
* @param competition_id
|
|
147
|
+
* @returns promise
|
|
148
|
+
*/
|
|
149
|
+
static invites<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
150
|
+
/**
|
|
151
|
+
* Sends invite
|
|
152
|
+
*
|
|
153
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionSendInvite
|
|
154
|
+
*
|
|
155
|
+
* @param competition_id
|
|
156
|
+
* @returns promise
|
|
157
|
+
*/
|
|
158
|
+
static sendInvite<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
159
|
+
/**
|
|
160
|
+
* Accept invite
|
|
161
|
+
*
|
|
162
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionAcceptInvite
|
|
163
|
+
*
|
|
164
|
+
* @param competition_id
|
|
165
|
+
* @param token
|
|
166
|
+
* @returns promise
|
|
167
|
+
*/
|
|
168
|
+
static acceptInvite<T>(competition_id: string, token: string): AxiosPromise<Response<T>>;
|
|
169
|
+
/**
|
|
170
|
+
* Round brackets
|
|
171
|
+
*
|
|
172
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketList1
|
|
173
|
+
*
|
|
174
|
+
* @param competition_id
|
|
175
|
+
* @param round_id
|
|
176
|
+
* @returns promise
|
|
177
|
+
*/
|
|
178
|
+
static brackets<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
179
|
+
/**
|
|
180
|
+
* Store round brackets
|
|
181
|
+
*
|
|
182
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketStorage
|
|
183
|
+
*
|
|
184
|
+
* @param competition_id
|
|
185
|
+
* @param round_id
|
|
186
|
+
* @returns promise
|
|
187
|
+
*/
|
|
188
|
+
static bracketStore<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
189
|
+
/**
|
|
190
|
+
* Show round bracket
|
|
191
|
+
*
|
|
192
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundBracketShow
|
|
193
|
+
*
|
|
194
|
+
* @param competition_id
|
|
195
|
+
* @param round_id
|
|
196
|
+
* @param bracket_id
|
|
197
|
+
* @returns promise
|
|
198
|
+
*/
|
|
199
|
+
static showBracket<T>(competition_id: string, round_id: number, bracket_id: number): AxiosPromise<Response<T>>;
|
|
200
|
+
/**
|
|
201
|
+
* Update bracket
|
|
202
|
+
*
|
|
203
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateRoundBracket
|
|
204
|
+
*
|
|
205
|
+
* @param competition_id
|
|
206
|
+
* @param round_id
|
|
207
|
+
* @param bracket_id
|
|
208
|
+
* @returns promise
|
|
209
|
+
*/
|
|
210
|
+
static updateBracket<T>(competition_id: string, round_id: number, bracket_id: number): AxiosPromise<Response<T>>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete bracket
|
|
213
|
+
*
|
|
214
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryRoundBracket
|
|
215
|
+
*
|
|
216
|
+
* @param competition_id
|
|
217
|
+
* @param round_id
|
|
218
|
+
* @param bracket_id
|
|
219
|
+
* @returns promise
|
|
220
|
+
*/
|
|
221
|
+
static destroyBracket<T>(competition_id: string, round_id: number, bracket_id: number): AxiosPromise<Response<T>>;
|
|
222
|
+
/**
|
|
223
|
+
* List round
|
|
224
|
+
*
|
|
225
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundList
|
|
226
|
+
*
|
|
227
|
+
* @param competition_id
|
|
228
|
+
* @returns promise
|
|
229
|
+
*/
|
|
230
|
+
static rounds<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
231
|
+
/**
|
|
232
|
+
* Create a new round for competition
|
|
233
|
+
*
|
|
234
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundStorage
|
|
235
|
+
*
|
|
236
|
+
* @param competition_id
|
|
237
|
+
* @returns promise
|
|
238
|
+
*/
|
|
239
|
+
static roundStore<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
240
|
+
/**
|
|
241
|
+
* Retrieve the information for a single round.
|
|
242
|
+
*
|
|
243
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceRoundShow
|
|
244
|
+
*
|
|
245
|
+
* @param competition_id
|
|
246
|
+
* @param round_id
|
|
247
|
+
* @returns promise
|
|
248
|
+
*/
|
|
249
|
+
static showRound<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
250
|
+
/**
|
|
251
|
+
* Updating resource in storage with new information.
|
|
252
|
+
*
|
|
253
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateRound
|
|
254
|
+
*
|
|
255
|
+
* @param competition_id
|
|
256
|
+
* @param round_id
|
|
257
|
+
* @returns promise
|
|
258
|
+
*/
|
|
259
|
+
static updateRound<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
260
|
+
/**
|
|
261
|
+
* Deletes the round for the competition.
|
|
262
|
+
*
|
|
263
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryRound
|
|
264
|
+
*
|
|
265
|
+
* @param competition_id
|
|
266
|
+
* @param round_id
|
|
267
|
+
* @returns promise
|
|
268
|
+
*/
|
|
269
|
+
static destroyRound<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
270
|
+
/**
|
|
271
|
+
* Retrieve a list of teams associated with the competition.
|
|
272
|
+
*
|
|
273
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceCompetitionTeamList
|
|
274
|
+
*
|
|
275
|
+
* @param competition_id
|
|
276
|
+
* @returns promise
|
|
277
|
+
*/
|
|
278
|
+
static team<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
279
|
+
/**
|
|
280
|
+
* Associate a new team with the competition.
|
|
281
|
+
*
|
|
282
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceCompetitionTeamStorage
|
|
283
|
+
*
|
|
284
|
+
* @param competition_id
|
|
285
|
+
* @returns promise
|
|
286
|
+
*/
|
|
287
|
+
static teamStore<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
288
|
+
/**
|
|
289
|
+
* Display the contents of a single team associated with the competition.
|
|
290
|
+
*
|
|
291
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceTeamShow
|
|
292
|
+
*
|
|
293
|
+
* @param competition_id
|
|
294
|
+
* @param team
|
|
295
|
+
* @returns promise
|
|
296
|
+
*/
|
|
297
|
+
static showTeam<T>(competition_id: string, team: string): AxiosPromise<Response<T>>;
|
|
298
|
+
/**
|
|
299
|
+
* Update the team information associated with the competition.
|
|
300
|
+
*
|
|
301
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateTeam
|
|
302
|
+
*
|
|
303
|
+
* @param competition_id
|
|
304
|
+
* @param team_id
|
|
305
|
+
* @returns promise
|
|
306
|
+
*/
|
|
307
|
+
static updateTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
308
|
+
/**
|
|
309
|
+
* Removes the team from the competition.
|
|
310
|
+
*
|
|
311
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/destoryTeam
|
|
312
|
+
*
|
|
313
|
+
* @param competition_id
|
|
314
|
+
* @param team_id
|
|
315
|
+
* @returns promise
|
|
316
|
+
*/
|
|
317
|
+
static destroyTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
318
|
+
/**
|
|
319
|
+
* List all the users associated with a competition.
|
|
320
|
+
*
|
|
321
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionUserList
|
|
322
|
+
*
|
|
323
|
+
* @param competition_id
|
|
324
|
+
* @returns promise
|
|
325
|
+
*/
|
|
326
|
+
static users<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
327
|
+
/**
|
|
328
|
+
* Associate a new users with the competition.
|
|
329
|
+
*
|
|
330
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/createCompetitionUser
|
|
331
|
+
*
|
|
332
|
+
* @param competition_id
|
|
333
|
+
* @returns promise
|
|
334
|
+
*/
|
|
335
|
+
static competitionUser<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
336
|
+
/**
|
|
337
|
+
* Show a single user by its ID.
|
|
338
|
+
*
|
|
339
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/showCompetitionUser
|
|
340
|
+
*
|
|
341
|
+
* @param competition_id
|
|
342
|
+
* @param user_id
|
|
343
|
+
* @returns promise
|
|
344
|
+
*/
|
|
345
|
+
static showCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
346
|
+
/**
|
|
347
|
+
* Update the user associated with competition.
|
|
348
|
+
*
|
|
349
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateCompetitionUser
|
|
350
|
+
*
|
|
351
|
+
* @param competition_id
|
|
352
|
+
* @param user_id
|
|
353
|
+
* @returns promise
|
|
354
|
+
*/
|
|
355
|
+
static updateCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
356
|
+
/**
|
|
357
|
+
* Remove the associated user from the competition.
|
|
358
|
+
*
|
|
359
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/removeCompetitionUser
|
|
360
|
+
*
|
|
361
|
+
* @param competition_id
|
|
362
|
+
* @param user_id
|
|
363
|
+
* @returns promise
|
|
364
|
+
*/
|
|
365
|
+
static destroyCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
366
|
+
/**
|
|
367
|
+
* List all the venues associated with a competition.
|
|
368
|
+
*
|
|
369
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/venueList
|
|
370
|
+
*
|
|
371
|
+
* @param competition_id
|
|
372
|
+
* @returns promise
|
|
373
|
+
*/
|
|
374
|
+
static venues<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
375
|
+
/**
|
|
376
|
+
* Creating a new venue.
|
|
377
|
+
*
|
|
378
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/createVenue
|
|
379
|
+
*
|
|
380
|
+
* @param competition_id
|
|
381
|
+
* @returns promise
|
|
382
|
+
*/
|
|
383
|
+
static newVenue<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
384
|
+
/**
|
|
385
|
+
* Show a single venue by its ID.
|
|
386
|
+
*
|
|
387
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/showVenue
|
|
388
|
+
*
|
|
389
|
+
* @param competition_id
|
|
390
|
+
* @param venue_id
|
|
391
|
+
* @returns promise
|
|
392
|
+
*/
|
|
393
|
+
static showVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
394
|
+
/**
|
|
395
|
+
* Update the venue.
|
|
396
|
+
*
|
|
397
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/updateVenue
|
|
398
|
+
*
|
|
399
|
+
* @param competition_id
|
|
400
|
+
* @param venue_id
|
|
401
|
+
* @returns promise
|
|
402
|
+
*/
|
|
403
|
+
static updateVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
404
|
+
/**
|
|
405
|
+
* Deletes the venue from the competition.
|
|
406
|
+
*
|
|
407
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/removeCompetitionVenue
|
|
408
|
+
*
|
|
409
|
+
* @param competition_id
|
|
410
|
+
* @param venue_id
|
|
411
|
+
* @returns promise
|
|
412
|
+
*/
|
|
413
|
+
static destroyVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
414
|
+
/**
|
|
415
|
+
* Upload venue main image to storage.
|
|
416
|
+
*
|
|
417
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
418
|
+
*
|
|
419
|
+
* @param competition_id
|
|
420
|
+
* @param venue_id
|
|
421
|
+
* @returns promise
|
|
422
|
+
*/
|
|
423
|
+
static uploadVenueMainImage<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
52
424
|
}
|
|
53
425
|
export default Competitions;
|
package/dist/esm/api/Events.d.ts
CHANGED
|
@@ -49,5 +49,210 @@ declare class Events {
|
|
|
49
49
|
* @returns promise
|
|
50
50
|
*/
|
|
51
51
|
static delete<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* The event is synced with Invirtu for the lie streams. This will allow you to update
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventStorage
|
|
57
|
+
*
|
|
58
|
+
* @param event_id The id of the event to update.
|
|
59
|
+
* @param data The data to update.
|
|
60
|
+
*
|
|
61
|
+
* @returns promise
|
|
62
|
+
*/
|
|
63
|
+
static updateInvirtuEvent<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
|
|
64
|
+
/**
|
|
65
|
+
* Add an RTMP source to multicast a stream too.
|
|
66
|
+
*
|
|
67
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
68
|
+
*
|
|
69
|
+
* @param event_id The id of the event.
|
|
70
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
71
|
+
*
|
|
72
|
+
* @returns promise
|
|
73
|
+
*/
|
|
74
|
+
static addRTMPSource<T>(event_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
75
|
+
/**
|
|
76
|
+
* Update an RTMP Source for multicasing.
|
|
77
|
+
*
|
|
78
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
79
|
+
*
|
|
80
|
+
* @param event_id The id of the event.
|
|
81
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
82
|
+
*
|
|
83
|
+
* @returns promise
|
|
84
|
+
*/
|
|
85
|
+
static updateRTMPSource<T>(event_id: string, stream_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
86
|
+
/**
|
|
87
|
+
* Remove a RTMP source for multicasing.
|
|
88
|
+
*
|
|
89
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/addRTMPSource
|
|
90
|
+
*
|
|
91
|
+
* @param event_id The id of the event.
|
|
92
|
+
* @param data The data to be passed when adding an RTMP source.
|
|
93
|
+
*
|
|
94
|
+
* @returns promise
|
|
95
|
+
*/
|
|
96
|
+
static removeRTMPSource<T>(event_id: string, stream_id: string): AxiosPromise<Response<T>>;
|
|
97
|
+
/**
|
|
98
|
+
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
99
|
+
*
|
|
100
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/syncLive
|
|
101
|
+
*
|
|
102
|
+
* @param event_id The id of the event.
|
|
103
|
+
*
|
|
104
|
+
* @returns promise
|
|
105
|
+
*/
|
|
106
|
+
static syncAsLive<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
107
|
+
/**
|
|
108
|
+
* Updates the main image for the event using a File object.
|
|
109
|
+
*
|
|
110
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
|
|
111
|
+
*
|
|
112
|
+
* @param file The file object to upload.
|
|
113
|
+
* @param data Any additional data to pass along to the upload.
|
|
114
|
+
*
|
|
115
|
+
* @returns promise
|
|
116
|
+
*/
|
|
117
|
+
static uploadMainImageFile<T>(event_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
118
|
+
/**
|
|
119
|
+
* Updates the main image for the event using a Blob.
|
|
120
|
+
*
|
|
121
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadMainEventImage
|
|
122
|
+
*
|
|
123
|
+
* @param blob The blob to upload.
|
|
124
|
+
* @param data Any additional data to pass along to the upload
|
|
125
|
+
*
|
|
126
|
+
* @returns promise
|
|
127
|
+
*/
|
|
128
|
+
static uploadMainImageBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
129
|
+
/**
|
|
130
|
+
* Updates the banner image for the team using a File object.
|
|
131
|
+
*
|
|
132
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
133
|
+
*
|
|
134
|
+
* @param file The file object to upload.
|
|
135
|
+
* @param data Any additional data to pass along to the upload.
|
|
136
|
+
*
|
|
137
|
+
* @returns promise
|
|
138
|
+
*/
|
|
139
|
+
static uploadBannerImageFile<T>(event_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
140
|
+
/**
|
|
141
|
+
* Updates the banner image for the team using a Blob.
|
|
142
|
+
*
|
|
143
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadBannerEventImage
|
|
144
|
+
*
|
|
145
|
+
* @param blob The blob to upload.
|
|
146
|
+
* @param data Any additional data to pass along to the upload
|
|
147
|
+
*
|
|
148
|
+
* @returns promise
|
|
149
|
+
*/
|
|
150
|
+
static uploadBannerImageBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
151
|
+
/**
|
|
152
|
+
* Enable Broadcast Mode. Broadcast mode is when the live stream is broadcasted from the game play through a protocol
|
|
153
|
+
* such as screen sharing.
|
|
154
|
+
*
|
|
155
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/enableBroadcastMode
|
|
156
|
+
*
|
|
157
|
+
* @param event_id The id of the event.
|
|
158
|
+
*
|
|
159
|
+
* @returns promise
|
|
160
|
+
*/
|
|
161
|
+
static enableBroadcastMode<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
162
|
+
/**
|
|
163
|
+
* Enable livestream mode, in which the stream will be delivered to the invirtu RTMP endpoint for
|
|
164
|
+
* streaming.
|
|
165
|
+
*
|
|
166
|
+
* @param event_id The id of the event.
|
|
167
|
+
*
|
|
168
|
+
* @returns promise
|
|
169
|
+
*/
|
|
170
|
+
static enableLivestreamMode<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
171
|
+
/**
|
|
172
|
+
* Sends content that will appear on-screen to the user.
|
|
173
|
+
*
|
|
174
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/sendOnScreenContent
|
|
175
|
+
*
|
|
176
|
+
* @param event_id The id of the event.
|
|
177
|
+
* @param data The information to send on-screen.
|
|
178
|
+
*
|
|
179
|
+
* @returns promise
|
|
180
|
+
*/
|
|
181
|
+
static sendOnScreenContent<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
|
|
182
|
+
/**
|
|
183
|
+
* Uploads an image that can be used and overlay later. A File object is used.
|
|
184
|
+
*
|
|
185
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadOverlayImage
|
|
186
|
+
*
|
|
187
|
+
* @param event_id The id of the event.
|
|
188
|
+
* @param file The image as a file.
|
|
189
|
+
* @param data Any additional data to be sent in the request.
|
|
190
|
+
*
|
|
191
|
+
* @returns promise
|
|
192
|
+
*/
|
|
193
|
+
static addOverlayAsFile<T>(event_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
194
|
+
/**
|
|
195
|
+
* Uploads an image that can be used and overlay later. A blob is used.
|
|
196
|
+
*
|
|
197
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/uploadOverlayImage
|
|
198
|
+
*
|
|
199
|
+
* @param event_id The id of the event.
|
|
200
|
+
* @param blob Image data as a blob
|
|
201
|
+
* @param data Any additional data to be sent in the request.
|
|
202
|
+
*
|
|
203
|
+
* @returns promise
|
|
204
|
+
*/
|
|
205
|
+
static addOverlayAsBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
206
|
+
/**
|
|
207
|
+
* Deletes an overlay image.
|
|
208
|
+
*
|
|
209
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/destoryOverlayStorage
|
|
210
|
+
*
|
|
211
|
+
* @param event_id The id of the event.
|
|
212
|
+
* @param overlay_id The id of the overlay.
|
|
213
|
+
*
|
|
214
|
+
* @returns promise
|
|
215
|
+
*/
|
|
216
|
+
static removeOverlay<T>(event_id: string, overlay_id: string): AxiosPromise<Response<T>>;
|
|
217
|
+
/**
|
|
218
|
+
* Enables an overlay so that it will appear on screen.
|
|
219
|
+
*
|
|
220
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/enableOverlayImage
|
|
221
|
+
*
|
|
222
|
+
* @param event_id The id of the event.
|
|
223
|
+
* @param overlay_id The id of the overlay.
|
|
224
|
+
*
|
|
225
|
+
* @returns promise
|
|
226
|
+
*/
|
|
227
|
+
static enableOverlay<T>(event_id: string, overlay_id: string): AxiosPromise<Response<T>>;
|
|
228
|
+
/**
|
|
229
|
+
* Disables the overlay so it no longer appears on-screen.
|
|
230
|
+
*
|
|
231
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/disableOverlay
|
|
232
|
+
*
|
|
233
|
+
* @param event_id The id of the event.
|
|
234
|
+
*
|
|
235
|
+
* @returns promise
|
|
236
|
+
*/
|
|
237
|
+
static disableOverlay<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
238
|
+
/**
|
|
239
|
+
* Enable the donations to appear on-screen
|
|
240
|
+
*
|
|
241
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/enableDonations
|
|
242
|
+
*
|
|
243
|
+
* @param event_id The id of the event.
|
|
244
|
+
*
|
|
245
|
+
* @returns promise
|
|
246
|
+
*/
|
|
247
|
+
static enableDonations<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
248
|
+
/**
|
|
249
|
+
* Disable the donations and remove from the screen.
|
|
250
|
+
*
|
|
251
|
+
* @param event_id
|
|
252
|
+
* @returns
|
|
253
|
+
*/
|
|
254
|
+
static disableDonations<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
255
|
+
static sendInvite<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
|
|
256
|
+
static acceptInvite<T>(event_id: string, token: string): AxiosPromise<Response<T>>;
|
|
52
257
|
}
|
|
53
258
|
export default Events;
|