glitch-javascript-sdk 0.1.9 → 0.2.0
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 +13 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Competitions.d.ts +4 -4
- package/dist/esm/index.js +13 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/package.json +1 -1
- package/src/api/Competitions.ts +13 -13
|
@@ -209,7 +209,7 @@ declare class Competitions {
|
|
|
209
209
|
* @param round_id
|
|
210
210
|
* @returns promise
|
|
211
211
|
*/
|
|
212
|
-
static
|
|
212
|
+
static createBracket<T>(competition_id: string, round_id: number, data?: object): AxiosPromise<Response<T>>;
|
|
213
213
|
/**
|
|
214
214
|
* Show round bracket
|
|
215
215
|
*
|
|
@@ -314,11 +314,11 @@ declare class Competitions {
|
|
|
314
314
|
*
|
|
315
315
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceTeamShow
|
|
316
316
|
*
|
|
317
|
-
* @param competition_id
|
|
318
|
-
* @param team
|
|
317
|
+
* @param competition_id The id of the competition
|
|
318
|
+
* @param team_id The id of the team
|
|
319
319
|
* @returns promise
|
|
320
320
|
*/
|
|
321
|
-
static showTeam<T>(competition_id: string,
|
|
321
|
+
static showTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
322
322
|
/**
|
|
323
323
|
* Update the team information associated with the competition.
|
|
324
324
|
*
|
package/dist/esm/index.js
CHANGED
|
@@ -30173,7 +30173,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30173
30173
|
* @returns promise
|
|
30174
30174
|
*/
|
|
30175
30175
|
Competitions.update = function (competition_id, data) {
|
|
30176
|
-
return Requests.processRoute(CompetitionRoutes.routes.
|
|
30176
|
+
return Requests.processRoute(CompetitionRoutes.routes.update, data, { competition_id: competition_id });
|
|
30177
30177
|
};
|
|
30178
30178
|
/**
|
|
30179
30179
|
* Retrieve the information for a single competition.
|
|
@@ -30243,7 +30243,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30243
30243
|
* @returns promise
|
|
30244
30244
|
*/
|
|
30245
30245
|
Competitions.registerUser = function (competition_id) {
|
|
30246
|
-
return Requests.processRoute(CompetitionRoutes.routes.registerUser, { competition_id: competition_id });
|
|
30246
|
+
return Requests.processRoute(CompetitionRoutes.routes.registerUser, {}, { competition_id: competition_id });
|
|
30247
30247
|
};
|
|
30248
30248
|
/**
|
|
30249
30249
|
* Sync rounds
|
|
@@ -30268,7 +30268,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30268
30268
|
* @returns promise
|
|
30269
30269
|
*/
|
|
30270
30270
|
Competitions.autoGenerate = function (competition_id, round_id) {
|
|
30271
|
-
return Requests.processRoute(CompetitionRoutes.routes.autoGenerate, {
|
|
30271
|
+
return Requests.processRoute(CompetitionRoutes.routes.autoGenerate, {}, { competition_id: competition_id, round_id: round_id });
|
|
30272
30272
|
};
|
|
30273
30273
|
/**
|
|
30274
30274
|
* auto generate user brackets
|
|
@@ -30279,7 +30279,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30279
30279
|
* @returns promise
|
|
30280
30280
|
*/
|
|
30281
30281
|
Competitions.autoGenerateUserBrackets = function (competition_id) {
|
|
30282
|
-
return Requests.processRoute(CompetitionRoutes.routes.autoGenerateUserBrackets, { competition_id: competition_id });
|
|
30282
|
+
return Requests.processRoute(CompetitionRoutes.routes.autoGenerateUserBrackets, {}, { competition_id: competition_id });
|
|
30283
30283
|
};
|
|
30284
30284
|
/**
|
|
30285
30285
|
* Updates the main image for the event using a File object.
|
|
@@ -30346,7 +30346,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30346
30346
|
* @returns promise
|
|
30347
30347
|
*/
|
|
30348
30348
|
Competitions.invites = function (competition_id) {
|
|
30349
|
-
return Requests.processRoute(CompetitionRoutes.routes.invites, { competition_id: competition_id });
|
|
30349
|
+
return Requests.processRoute(CompetitionRoutes.routes.invites, {}, { competition_id: competition_id });
|
|
30350
30350
|
};
|
|
30351
30351
|
/**
|
|
30352
30352
|
* Sends invite
|
|
@@ -30357,7 +30357,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30357
30357
|
* @returns promise
|
|
30358
30358
|
*/
|
|
30359
30359
|
Competitions.sendInvite = function (competition_id) {
|
|
30360
|
-
return Requests.processRoute(CompetitionRoutes.routes.sendInvite, { competition_id: competition_id });
|
|
30360
|
+
return Requests.processRoute(CompetitionRoutes.routes.sendInvite, {}, { competition_id: competition_id });
|
|
30361
30361
|
};
|
|
30362
30362
|
/**
|
|
30363
30363
|
* Accept invite
|
|
@@ -30369,7 +30369,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30369
30369
|
* @returns promise
|
|
30370
30370
|
*/
|
|
30371
30371
|
Competitions.acceptInvite = function (competition_id, token) {
|
|
30372
|
-
return Requests.processRoute(CompetitionRoutes.routes.acceptInvite, {
|
|
30372
|
+
return Requests.processRoute(CompetitionRoutes.routes.acceptInvite, { token: token }, { competition_id: competition_id });
|
|
30373
30373
|
};
|
|
30374
30374
|
/**
|
|
30375
30375
|
* Round brackets
|
|
@@ -30392,7 +30392,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30392
30392
|
* @param round_id
|
|
30393
30393
|
* @returns promise
|
|
30394
30394
|
*/
|
|
30395
|
-
Competitions.
|
|
30395
|
+
Competitions.createBracket = function (competition_id, round_id, data) {
|
|
30396
30396
|
return Requests.processRoute(CompetitionRoutes.routes.bracketStore, data, { round_id: round_id, competition_id: competition_id });
|
|
30397
30397
|
};
|
|
30398
30398
|
/**
|
|
@@ -30519,12 +30519,12 @@ var Competitions = /** @class */ (function () {
|
|
|
30519
30519
|
*
|
|
30520
30520
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/resourceTeamShow
|
|
30521
30521
|
*
|
|
30522
|
-
* @param competition_id
|
|
30523
|
-
* @param team
|
|
30522
|
+
* @param competition_id The id of the competition
|
|
30523
|
+
* @param team_id The id of the team
|
|
30524
30524
|
* @returns promise
|
|
30525
30525
|
*/
|
|
30526
|
-
Competitions.showTeam = function (competition_id,
|
|
30527
|
-
return Requests.processRoute(CompetitionRoutes.routes.showTeam, {
|
|
30526
|
+
Competitions.showTeam = function (competition_id, team_id) {
|
|
30527
|
+
return Requests.processRoute(CompetitionRoutes.routes.showTeam, {}, { team_id: team_id, competition_id: competition_id });
|
|
30528
30528
|
};
|
|
30529
30529
|
/**
|
|
30530
30530
|
* Update the team information associated with the competition.
|
|
@@ -30570,7 +30570,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30570
30570
|
* @returns promise
|
|
30571
30571
|
*/
|
|
30572
30572
|
Competitions.createCompetitionUser = function (competition_id, data) {
|
|
30573
|
-
return Requests.processRoute(CompetitionRoutes.routes.competitionUser,
|
|
30573
|
+
return Requests.processRoute(CompetitionRoutes.routes.competitionUser, data, { competition_id: competition_id });
|
|
30574
30574
|
};
|
|
30575
30575
|
/**
|
|
30576
30576
|
* Show a single user by its ID.
|