@mtgame/core 0.0.47 → 0.0.49
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/api/league-api.d.ts +2 -0
- package/api/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +16 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/league-api.js +10 -1
- package/esm2015/api/tournament-api.js +4 -1
- package/esm2015/api/tournament-season-api.js +4 -1
- package/esm5/api/league-api.js +12 -1
- package/esm5/api/tournament-api.js +4 -1
- package/esm5/api/tournament-season-api.js +4 -1
- package/fesm2015/mtgame-core.js +14 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +16 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -3065,6 +3065,9 @@ var LeagueApi = /** @class */ (function () {
|
|
|
3065
3065
|
statuses = filters.statuses.map(function (i) { return GameStatuses[i]; });
|
|
3066
3066
|
params = params.set('statuses', statuses.join(','));
|
|
3067
3067
|
}
|
|
3068
|
+
if (filters.tournamentCourtId) {
|
|
3069
|
+
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
3070
|
+
}
|
|
3068
3071
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/games/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
3069
3072
|
total: +result.headers.get('X-Page-Count'),
|
|
3070
3073
|
data: Game.toFront(result.body)
|
|
@@ -3090,6 +3093,13 @@ var LeagueApi = /** @class */ (function () {
|
|
|
3090
3093
|
});
|
|
3091
3094
|
});
|
|
3092
3095
|
};
|
|
3096
|
+
LeagueApi.prototype.getCourts = function (leagueId) {
|
|
3097
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3098
|
+
return __generator(this, function (_a) {
|
|
3099
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/courts/").pipe(map(function (result) { return LeagueCourt.toFront(result); })).toPromise()];
|
|
3100
|
+
});
|
|
3101
|
+
});
|
|
3102
|
+
};
|
|
3093
3103
|
LeagueApi.ctorParameters = function () { return [
|
|
3094
3104
|
{ type: HttpClient },
|
|
3095
3105
|
{ type: ConfigService }
|
|
@@ -5215,6 +5225,9 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5215
5225
|
statuses = filters.statuses.map(function (i) { return GameStatuses[i]; });
|
|
5216
5226
|
params = params.set('statuses', statuses.join(','));
|
|
5217
5227
|
}
|
|
5228
|
+
if (filters.tournamentCourtId) {
|
|
5229
|
+
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5230
|
+
}
|
|
5218
5231
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/games/", { params: params, observe: 'response' })
|
|
5219
5232
|
.pipe(map(function (result) { return ({
|
|
5220
5233
|
total: +result.headers.get('X-Page-Count'),
|
|
@@ -5543,6 +5556,9 @@ var TournamentSeasonApi = /** @class */ (function () {
|
|
|
5543
5556
|
statuses = filters.statuses.map(function (i) { return GameStatuses[i]; });
|
|
5544
5557
|
params = params.set('statuses', statuses.join(','));
|
|
5545
5558
|
}
|
|
5559
|
+
if (filters.tournamentCourtId) {
|
|
5560
|
+
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5561
|
+
}
|
|
5546
5562
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_season/" + seasonId + "/games/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5547
5563
|
total: +result.headers.get('X-Page-Count'),
|
|
5548
5564
|
data: Game.toFront(result.body)
|