glitch-javascript-sdk 0.3.9 → 0.4.1
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 +132 -89
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Competitions.d.ts +12 -3
- package/dist/esm/config/Config.d.ts +9 -0
- package/dist/esm/index.js +296 -271
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/util/Storage.d.ts +10 -1
- package/dist/index.d.ts +31 -4
- package/package.json +1 -1
- package/src/api/Competitions.ts +15 -3
- package/src/config/Config.ts +34 -5
- package/src/routes/CompetitionRoute.ts +1 -0
- package/src/util/Storage.ts +79 -85
|
@@ -469,7 +469,7 @@ declare class Competitions {
|
|
|
469
469
|
/**
|
|
470
470
|
* Get a leaderboard by a users wins.
|
|
471
471
|
*
|
|
472
|
-
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/
|
|
472
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardUserWins
|
|
473
473
|
*
|
|
474
474
|
* @param competition_id
|
|
475
475
|
* @returns promise
|
|
@@ -487,7 +487,7 @@ declare class Competitions {
|
|
|
487
487
|
/**
|
|
488
488
|
* Get a leaderboard by a teams wins.
|
|
489
489
|
*
|
|
490
|
-
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/
|
|
490
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardTeamWins
|
|
491
491
|
*
|
|
492
492
|
* @param competition_id
|
|
493
493
|
* @returns promise
|
|
@@ -496,11 +496,20 @@ declare class Competitions {
|
|
|
496
496
|
/**
|
|
497
497
|
* Get all leaderboards.
|
|
498
498
|
*
|
|
499
|
-
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/
|
|
499
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderBoardTeamPoints
|
|
500
500
|
*
|
|
501
501
|
* @param competition_id
|
|
502
502
|
* @returns promise
|
|
503
503
|
*/
|
|
504
504
|
static allLeaderboards<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
505
|
+
/**
|
|
506
|
+
* Gets all the information about a competition for the current user.
|
|
507
|
+
*
|
|
508
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/competitionLeaderboardsAll
|
|
509
|
+
*
|
|
510
|
+
* @param competition_id
|
|
511
|
+
* @returns promise
|
|
512
|
+
*/
|
|
513
|
+
static me<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
505
514
|
}
|
|
506
515
|
export default Competitions;
|
|
@@ -8,6 +8,7 @@ declare class Config {
|
|
|
8
8
|
private static _baseUrl;
|
|
9
9
|
private static _authToken;
|
|
10
10
|
private static _community;
|
|
11
|
+
private static _rootDomain;
|
|
11
12
|
private static _baseUrlLocked;
|
|
12
13
|
/**
|
|
13
14
|
* Set the configuration
|
|
@@ -35,6 +36,14 @@ declare class Config {
|
|
|
35
36
|
* @param community The object of the community
|
|
36
37
|
*/
|
|
37
38
|
static setCommunity(community: Record<string, any>): void;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the root level domain so data can accessed across
|
|
41
|
+
* multiple subdomains
|
|
42
|
+
*
|
|
43
|
+
* @param domain The domain ie: example.com
|
|
44
|
+
*/
|
|
45
|
+
static setRootDomain(domain: string): void;
|
|
46
|
+
static getRootDomain(): string;
|
|
38
47
|
/**
|
|
39
48
|
* Gets base url
|
|
40
49
|
*/
|