@mtgame/core 0.0.37 → 0.0.39
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/basketball-game-api.d.ts +1 -0
- package/api/league-api.d.ts +6 -1
- package/api/league-news-api.d.ts +2 -1
- package/api/media-api.d.ts +5 -0
- package/api/public-api.d.ts +1 -0
- package/api/tournament-api.d.ts +4 -1
- package/api/tournament-season-api.d.ts +23 -0
- package/bundles/mtgame-core.umd.js +302 -7
- 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/basketball-game-api.js +7 -1
- package/esm2015/api/league-api.js +50 -1
- package/esm2015/api/league-news-api.js +13 -4
- package/esm2015/api/media-api.js +17 -1
- package/esm2015/api/public-api.js +2 -1
- package/esm2015/api/tournament-api.js +10 -3
- package/esm2015/api/tournament-season-api.js +138 -0
- package/esm2015/models/game.js +4 -1
- package/esm2015/models/public-api.js +2 -1
- package/esm2015/models/tournament-season.js +40 -0
- package/esm2015/models/tournament-team.js +2 -1
- package/esm2015/models/tournament.js +10 -3
- package/esm5/api/basketball-game-api.js +9 -1
- package/esm5/api/league-api.js +58 -1
- package/esm5/api/league-news-api.js +16 -4
- package/esm5/api/media-api.js +21 -1
- package/esm5/api/public-api.js +2 -1
- package/esm5/api/tournament-api.js +11 -4
- package/esm5/api/tournament-season-api.js +156 -0
- package/esm5/models/game.js +4 -1
- package/esm5/models/public-api.js +2 -1
- package/esm5/models/tournament-season.js +45 -0
- package/esm5/models/tournament-team.js +2 -1
- package/esm5/models/tournament.js +10 -3
- package/fesm2015/mtgame-core.js +260 -7
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +301 -8
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/game.d.ts +2 -0
- package/models/public-api.d.ts +1 -0
- package/models/tournament-season.d.ts +18 -0
- package/models/tournament-team.d.ts +1 -0
- package/models/tournament.d.ts +4 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm2015/mtgame-core.js
CHANGED
|
@@ -737,6 +737,42 @@ League = __decorate([
|
|
|
737
737
|
})
|
|
738
738
|
], League);
|
|
739
739
|
|
|
740
|
+
var TournamentSeasonStatuses;
|
|
741
|
+
(function (TournamentSeasonStatuses) {
|
|
742
|
+
TournamentSeasonStatuses[TournamentSeasonStatuses["open"] = 0] = "open";
|
|
743
|
+
TournamentSeasonStatuses[TournamentSeasonStatuses["in_progress"] = 1] = "in_progress";
|
|
744
|
+
TournamentSeasonStatuses[TournamentSeasonStatuses["closed"] = 2] = "closed";
|
|
745
|
+
})(TournamentSeasonStatuses || (TournamentSeasonStatuses = {}));
|
|
746
|
+
let TournamentSeason = class TournamentSeason extends BaseModel {
|
|
747
|
+
static toFront(data) { }
|
|
748
|
+
static toBack(data) { }
|
|
749
|
+
};
|
|
750
|
+
__decorate([
|
|
751
|
+
ToFrontHook
|
|
752
|
+
], TournamentSeason, "toFront", null);
|
|
753
|
+
__decorate([
|
|
754
|
+
ToBackHook
|
|
755
|
+
], TournamentSeason, "toBack", null);
|
|
756
|
+
TournamentSeason = __decorate([
|
|
757
|
+
ModelInstance({
|
|
758
|
+
mappingFields: {
|
|
759
|
+
id: 'id',
|
|
760
|
+
name: 'name',
|
|
761
|
+
alias: 'alias',
|
|
762
|
+
logo: 'logo',
|
|
763
|
+
cover: 'cover',
|
|
764
|
+
preview_image: 'previewImage',
|
|
765
|
+
status: 'status',
|
|
766
|
+
},
|
|
767
|
+
relation: {
|
|
768
|
+
logo: File,
|
|
769
|
+
cover: File,
|
|
770
|
+
previewImage: File,
|
|
771
|
+
status: enumField(TournamentSeasonStatuses),
|
|
772
|
+
}
|
|
773
|
+
})
|
|
774
|
+
], TournamentSeason);
|
|
775
|
+
|
|
740
776
|
var TournamentTypes;
|
|
741
777
|
(function (TournamentTypes) {
|
|
742
778
|
TournamentTypes["group"] = "group";
|
|
@@ -901,7 +937,10 @@ Tournament = __decorate([
|
|
|
901
937
|
teams_count: 'teamsCount',
|
|
902
938
|
closest_game_datetime: 'closestGameDatetime',
|
|
903
939
|
status: 'status',
|
|
904
|
-
team_winner: 'teamWinner'
|
|
940
|
+
team_winner: 'teamWinner',
|
|
941
|
+
team_second: 'teamSecond',
|
|
942
|
+
team_third: 'teamThird',
|
|
943
|
+
season: 'season',
|
|
905
944
|
},
|
|
906
945
|
relation: {
|
|
907
946
|
logo: File,
|
|
@@ -914,7 +953,10 @@ Tournament = __decorate([
|
|
|
914
953
|
date: DateTimeField,
|
|
915
954
|
league: League,
|
|
916
955
|
status: enumField(TournamentStatuses),
|
|
917
|
-
teamWinner: TournamentTeamWinner
|
|
956
|
+
teamWinner: TournamentTeamWinner,
|
|
957
|
+
teamSecond: TournamentTeamWinner,
|
|
958
|
+
teamThird: TournamentTeamWinner,
|
|
959
|
+
season: TournamentSeason,
|
|
918
960
|
}
|
|
919
961
|
})
|
|
920
962
|
], Tournament);
|
|
@@ -1168,6 +1210,7 @@ Game = __decorate([
|
|
|
1168
1210
|
tournament_court: 'tournamentCourt',
|
|
1169
1211
|
media_count: 'mediaCount',
|
|
1170
1212
|
media: 'media',
|
|
1213
|
+
tournament: 'tournament',
|
|
1171
1214
|
},
|
|
1172
1215
|
relation: {
|
|
1173
1216
|
status: enumField(GameStatuses),
|
|
@@ -1180,6 +1223,7 @@ Game = __decorate([
|
|
|
1180
1223
|
hockeyGameConfig: HockeyGameConfig,
|
|
1181
1224
|
tournamentCourt: LeagueCourt,
|
|
1182
1225
|
media: listField(MediaItem),
|
|
1226
|
+
tournament: Tournament,
|
|
1183
1227
|
}
|
|
1184
1228
|
})
|
|
1185
1229
|
], Game);
|
|
@@ -1263,6 +1307,7 @@ TournamentTeam = __decorate([
|
|
|
1263
1307
|
tournament: 'tournament',
|
|
1264
1308
|
team: 'team',
|
|
1265
1309
|
group: 'group',
|
|
1310
|
+
final_standing: 'finalStanding',
|
|
1266
1311
|
games_count: 'gamesCount',
|
|
1267
1312
|
won_games_count: 'wonGamesCount',
|
|
1268
1313
|
draw_games_count: 'drawGamesCount',
|
|
@@ -1844,6 +1889,12 @@ let BasketballGameApi = class BasketballGameApi {
|
|
|
1844
1889
|
.toPromise();
|
|
1845
1890
|
});
|
|
1846
1891
|
}
|
|
1892
|
+
downloadFibaProtocol(gameId, fileType) {
|
|
1893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1894
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_basketball_game/${gameId}/game_protocol_fiba/?file_type=${fileType}`, { responseType: 'blob' })
|
|
1895
|
+
.toPromise();
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1847
1898
|
};
|
|
1848
1899
|
BasketballGameApi.ctorParameters = () => [
|
|
1849
1900
|
{ type: HttpClient },
|
|
@@ -2419,6 +2470,9 @@ let LeagueApi = class LeagueApi {
|
|
|
2419
2470
|
if (filters.search) {
|
|
2420
2471
|
params = params.set('search', filters.search);
|
|
2421
2472
|
}
|
|
2473
|
+
if (filters.tournamentTour) {
|
|
2474
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
2475
|
+
}
|
|
2422
2476
|
}
|
|
2423
2477
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/events/`, { params, observe: 'response' }).pipe(map(result => ({
|
|
2424
2478
|
total: +result.headers.get('X-Page-Count'),
|
|
@@ -2426,6 +2480,50 @@ let LeagueApi = class LeagueApi {
|
|
|
2426
2480
|
}))).toPromise();
|
|
2427
2481
|
});
|
|
2428
2482
|
}
|
|
2483
|
+
getTournamentSeasons(leagueId) {
|
|
2484
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2485
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/tournament_seasons/`).pipe(map(result => TournamentSeason.toFront(result))).toPromise();
|
|
2486
|
+
});
|
|
2487
|
+
}
|
|
2488
|
+
getGames(leagueId, page, size, filters) {
|
|
2489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2490
|
+
let params = new HttpParams().set('page', page.toString());
|
|
2491
|
+
if (size) {
|
|
2492
|
+
params = params.set('size', size.toString());
|
|
2493
|
+
}
|
|
2494
|
+
if (filters.tournamentStageId) {
|
|
2495
|
+
params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
|
|
2496
|
+
}
|
|
2497
|
+
if (filters.tournamentTour) {
|
|
2498
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
2499
|
+
}
|
|
2500
|
+
if (filters.playoffStage) {
|
|
2501
|
+
params = params.set('playoff_stage', filters.playoffStage.toString());
|
|
2502
|
+
}
|
|
2503
|
+
if (filters.teamId) {
|
|
2504
|
+
params = params.set('team_id', filters.teamId.toString());
|
|
2505
|
+
}
|
|
2506
|
+
if (filters.status) {
|
|
2507
|
+
params = params.set('status', GameStatuses[filters.status]);
|
|
2508
|
+
}
|
|
2509
|
+
if (filters.statuses) {
|
|
2510
|
+
const statuses = filters.statuses.map(i => GameStatuses[i]);
|
|
2511
|
+
params = params.set('statuses', statuses.join(','));
|
|
2512
|
+
}
|
|
2513
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/games/`, { params, observe: 'response' }).pipe(map(result => ({
|
|
2514
|
+
total: +result.headers.get('X-Page-Count'),
|
|
2515
|
+
data: Game.toFront(result.body)
|
|
2516
|
+
}))).toPromise();
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
getSeasons(leagueId, notClosed) {
|
|
2520
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2521
|
+
const params = new HttpParams().set('not_closed', notClosed ? '1' : '');
|
|
2522
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/tournament_seasons/`, { params })
|
|
2523
|
+
.pipe(map(result => TournamentSeason.toFront(result)))
|
|
2524
|
+
.toPromise();
|
|
2525
|
+
});
|
|
2526
|
+
}
|
|
2429
2527
|
};
|
|
2430
2528
|
LeagueApi.ctorParameters = () => [
|
|
2431
2529
|
{ type: HttpClient },
|
|
@@ -2441,9 +2539,11 @@ let LeagueNewsApi = class LeagueNewsApi {
|
|
|
2441
2539
|
this.httpClient = httpClient;
|
|
2442
2540
|
this.configService = configService;
|
|
2443
2541
|
}
|
|
2444
|
-
getLeagueNewsList(leagueId) {
|
|
2542
|
+
getLeagueNewsList(leagueId, page, size) {
|
|
2445
2543
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2446
|
-
|
|
2544
|
+
const params = new HttpParams().set('page', page.toString())
|
|
2545
|
+
.set('size', size.toString());
|
|
2546
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/news/`, { params, observe: 'response' })
|
|
2447
2547
|
.pipe(map(response => ({
|
|
2448
2548
|
total: +response.headers.get('X-Page-Count'),
|
|
2449
2549
|
data: LeagueNews.toFront(response.body)
|
|
@@ -2458,6 +2558,13 @@ let LeagueNewsApi = class LeagueNewsApi {
|
|
|
2458
2558
|
.toPromise();
|
|
2459
2559
|
});
|
|
2460
2560
|
}
|
|
2561
|
+
getMainLeagueNewsList(leagueId) {
|
|
2562
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2563
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/news/?is_main=true`)
|
|
2564
|
+
.pipe(map(response => LeagueNews.toFront(response)))
|
|
2565
|
+
.toPromise();
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2461
2568
|
getNewsById(newsId) {
|
|
2462
2569
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2463
2570
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league_news/${newsId}/`)
|
|
@@ -2557,6 +2664,22 @@ let MediaApi = class MediaApi {
|
|
|
2557
2664
|
})).toPromise();
|
|
2558
2665
|
});
|
|
2559
2666
|
}
|
|
2667
|
+
getLeagueMedia(leagueId, page, size, filters = {}) {
|
|
2668
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2669
|
+
let params = new HttpParams().set('page', page.toString()).set('size', size.toString());
|
|
2670
|
+
if (filters.mediaType) {
|
|
2671
|
+
params = params.set('media_type', filters.mediaType);
|
|
2672
|
+
}
|
|
2673
|
+
if (filters.sort) {
|
|
2674
|
+
params = params.set('sort', filters.sort);
|
|
2675
|
+
}
|
|
2676
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/media/`, { params, observe: 'response' })
|
|
2677
|
+
.pipe(map(response => ({
|
|
2678
|
+
total: +response.headers.get('X-Page-Count'),
|
|
2679
|
+
data: MediaItem.toFront(response.body)
|
|
2680
|
+
}))).toPromise();
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2560
2683
|
getGameMediaById(gameId) {
|
|
2561
2684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2562
2685
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/game_media/${gameId}/`).pipe(map(result => Game.toFront(result))).toPromise();
|
|
@@ -4089,9 +4212,9 @@ let TournamentApi = class TournamentApi {
|
|
|
4089
4212
|
this.httpClient = httpClient;
|
|
4090
4213
|
this.configService = configService;
|
|
4091
4214
|
}
|
|
4092
|
-
getByAlias(alias) {
|
|
4215
|
+
getByAlias(leagueId, alias) {
|
|
4093
4216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4094
|
-
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/
|
|
4217
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/tournaments/${alias}/`)
|
|
4095
4218
|
.pipe(map(result => Tournament.toFront(result)))
|
|
4096
4219
|
.toPromise();
|
|
4097
4220
|
});
|
|
@@ -4114,6 +4237,9 @@ let TournamentApi = class TournamentApi {
|
|
|
4114
4237
|
if (filters.search) {
|
|
4115
4238
|
params = params.set('search', filters.search);
|
|
4116
4239
|
}
|
|
4240
|
+
if (filters.tournamentTour) {
|
|
4241
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
4242
|
+
}
|
|
4117
4243
|
}
|
|
4118
4244
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/events/`, { params, observe: 'response' })
|
|
4119
4245
|
.pipe(map(result => ({
|
|
@@ -4166,6 +4292,10 @@ let TournamentApi = class TournamentApi {
|
|
|
4166
4292
|
if (filters.status) {
|
|
4167
4293
|
params = params.set('status', GameStatuses[filters.status]);
|
|
4168
4294
|
}
|
|
4295
|
+
if (filters.statuses) {
|
|
4296
|
+
const statuses = filters.statuses.map(i => GameStatuses[i]);
|
|
4297
|
+
params = params.set('statuses', statuses.join(','));
|
|
4298
|
+
}
|
|
4169
4299
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament/${tournamentId}/games/`, { params, observe: 'response' })
|
|
4170
4300
|
.pipe(map(result => ({
|
|
4171
4301
|
total: +result.headers.get('X-Page-Count'),
|
|
@@ -4364,6 +4494,129 @@ TournamentJoinApi = __decorate([
|
|
|
4364
4494
|
Injectable({ providedIn: 'root' })
|
|
4365
4495
|
], TournamentJoinApi);
|
|
4366
4496
|
|
|
4497
|
+
let TournamentSeasonApi = class TournamentSeasonApi {
|
|
4498
|
+
constructor(httpClient, configService) {
|
|
4499
|
+
this.httpClient = httpClient;
|
|
4500
|
+
this.configService = configService;
|
|
4501
|
+
}
|
|
4502
|
+
getByAlias(leagueId, alias) {
|
|
4503
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4504
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/league/${leagueId}/tournament_seasons/${alias}/`).pipe(map(result => TournamentSeason.toFront(result))).toPromise();
|
|
4505
|
+
});
|
|
4506
|
+
}
|
|
4507
|
+
getTournaments(seasonId) {
|
|
4508
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4509
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/tournaments/`).pipe(map(result => Tournament.toFront(result))).toPromise();
|
|
4510
|
+
});
|
|
4511
|
+
}
|
|
4512
|
+
getGames(seasonId, page, size, filters) {
|
|
4513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4514
|
+
let params = new HttpParams().set('page', page.toString());
|
|
4515
|
+
if (size) {
|
|
4516
|
+
params = params.set('size', size.toString());
|
|
4517
|
+
}
|
|
4518
|
+
if (filters.tournamentStageId) {
|
|
4519
|
+
params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
|
|
4520
|
+
}
|
|
4521
|
+
if (filters.tournamentTour) {
|
|
4522
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
4523
|
+
}
|
|
4524
|
+
if (filters.playoffStage) {
|
|
4525
|
+
params = params.set('playoff_stage', filters.playoffStage.toString());
|
|
4526
|
+
}
|
|
4527
|
+
if (filters.teamId) {
|
|
4528
|
+
params = params.set('team_id', filters.teamId.toString());
|
|
4529
|
+
}
|
|
4530
|
+
if (filters.status) {
|
|
4531
|
+
params = params.set('status', GameStatuses[filters.status]);
|
|
4532
|
+
}
|
|
4533
|
+
if (filters.statuses) {
|
|
4534
|
+
const statuses = filters.statuses.map(i => GameStatuses[i]);
|
|
4535
|
+
params = params.set('statuses', statuses.join(','));
|
|
4536
|
+
}
|
|
4537
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/games/`, { params, observe: 'response' }).pipe(map(result => ({
|
|
4538
|
+
total: +result.headers.get('X-Page-Count'),
|
|
4539
|
+
data: Game.toFront(result.body)
|
|
4540
|
+
}))).toPromise();
|
|
4541
|
+
});
|
|
4542
|
+
}
|
|
4543
|
+
getEvents(seasonId, page, size, filters) {
|
|
4544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4545
|
+
let params = new HttpParams().set('page', page.toString())
|
|
4546
|
+
.set('size', size.toString());
|
|
4547
|
+
if (filters) {
|
|
4548
|
+
if (filters.event) {
|
|
4549
|
+
params = params.set('event', TournamentEventTypes[filters.event]);
|
|
4550
|
+
}
|
|
4551
|
+
if (filters.search) {
|
|
4552
|
+
params = params.set('search', filters.search);
|
|
4553
|
+
}
|
|
4554
|
+
if (filters.tournamentTour) {
|
|
4555
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/events/`, { params, observe: 'response' })
|
|
4559
|
+
.pipe(map(result => ({
|
|
4560
|
+
total: +result.headers.get('X-Page-Count'),
|
|
4561
|
+
data: TournamentEvent.toFront(result.body)
|
|
4562
|
+
})))
|
|
4563
|
+
.toPromise();
|
|
4564
|
+
});
|
|
4565
|
+
}
|
|
4566
|
+
getGameMedia(seasonId, page, size, filters) {
|
|
4567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4568
|
+
let params = new HttpParams().set('page', page.toString()).set('size', size.toString());
|
|
4569
|
+
if (filters) {
|
|
4570
|
+
if (filters.tournamentTour) {
|
|
4571
|
+
params = params.set('tournament_tour', filters.tournamentTour.toString());
|
|
4572
|
+
}
|
|
4573
|
+
if (filters.teamId) {
|
|
4574
|
+
params = params.set('team_id', filters.teamId.toString());
|
|
4575
|
+
}
|
|
4576
|
+
if (filters.tournamentStageId) {
|
|
4577
|
+
params = params.set('tournament_stage_id', filters.tournamentStageId.toString());
|
|
4578
|
+
}
|
|
4579
|
+
if (filters.playoffId) {
|
|
4580
|
+
params = params.set('playoff_id', filters.playoffId.toString());
|
|
4581
|
+
}
|
|
4582
|
+
if (filters.playoffStage) {
|
|
4583
|
+
params = params.set('playoff_stage', filters.playoffStage.toString());
|
|
4584
|
+
}
|
|
4585
|
+
if (filters.status) {
|
|
4586
|
+
params = params.set('status', GameStatuses[filters.status]);
|
|
4587
|
+
}
|
|
4588
|
+
}
|
|
4589
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/game_media/`, { observe: 'response', params })
|
|
4590
|
+
.pipe(map(response => {
|
|
4591
|
+
return {
|
|
4592
|
+
total: +response.headers.get('X-Page-Count'),
|
|
4593
|
+
data: Game.toFront(response.body)
|
|
4594
|
+
};
|
|
4595
|
+
})).toPromise();
|
|
4596
|
+
});
|
|
4597
|
+
}
|
|
4598
|
+
getTeams(seasonId) {
|
|
4599
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4600
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/teams/`).pipe(map(result => TournamentTeam.toFront(result))).toPromise();
|
|
4601
|
+
});
|
|
4602
|
+
}
|
|
4603
|
+
getGamesStages(seasonId) {
|
|
4604
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4605
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_season/${seasonId}/games_stages/`)
|
|
4606
|
+
.pipe(map(data => GameTimelineStages.toFront(data)))
|
|
4607
|
+
.toPromise();
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4610
|
+
};
|
|
4611
|
+
TournamentSeasonApi.ctorParameters = () => [
|
|
4612
|
+
{ type: HttpClient },
|
|
4613
|
+
{ type: ConfigService }
|
|
4614
|
+
];
|
|
4615
|
+
TournamentSeasonApi.ɵprov = ɵɵdefineInjectable({ factory: function TournamentSeasonApi_Factory() { return new TournamentSeasonApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: TournamentSeasonApi, providedIn: "root" });
|
|
4616
|
+
TournamentSeasonApi = __decorate([
|
|
4617
|
+
Injectable({ providedIn: 'root' })
|
|
4618
|
+
], TournamentSeasonApi);
|
|
4619
|
+
|
|
4367
4620
|
let TournamentStageApi = class TournamentStageApi {
|
|
4368
4621
|
constructor(httpClient, configService) {
|
|
4369
4622
|
this.httpClient = httpClient;
|
|
@@ -5468,5 +5721,5 @@ HttpCookieInterceptor = __decorate([
|
|
|
5468
5721
|
* Generated bundle index. Do not edit.
|
|
5469
5722
|
*/
|
|
5470
5723
|
|
|
5471
|
-
export { BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueCourt, LeagueNews, LeagueNewsApi, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa };
|
|
5724
|
+
export { BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueCourt, LeagueNews, LeagueNewsApi, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa };
|
|
5472
5725
|
//# sourceMappingURL=mtgame-core.js.map
|