@mtgame/core 0.2.10 → 0.2.12
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/media-api.d.ts +2 -1
- package/bundles/mtgame-core.umd.js +6 -1
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/media-api.js +5 -1
- package/esm2015/models/tournament.js +2 -1
- package/fesm2015/mtgame-core.js +5 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/tournament.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/media-api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
2
2
|
import { MediaItem } from '../models/media-item';
|
|
3
|
-
import { Game } from '../models/game';
|
|
3
|
+
import { Game, GameStatuses } from '../models/game';
|
|
4
4
|
import { PaginatedResponse } from './paginated-response.interface';
|
|
5
5
|
import { ConfigService } from '../services/config.service';
|
|
6
6
|
import { TournamentGamesFilters } from './tournament-api';
|
|
@@ -11,6 +11,7 @@ export interface MediaFilters {
|
|
|
11
11
|
mediaType?: 'photo' | 'video' | 'live_video';
|
|
12
12
|
sort?: string;
|
|
13
13
|
teamId?: number;
|
|
14
|
+
statuses?: GameStatuses[];
|
|
14
15
|
}
|
|
15
16
|
export declare class MediaApi {
|
|
16
17
|
private httpClient;
|
|
@@ -1702,6 +1702,7 @@
|
|
|
1702
1702
|
misconduct_penalty_time: 'misconductPenaltyTime',
|
|
1703
1703
|
game_misconduct_penalty_time: 'gameMisconductPenaltyTime',
|
|
1704
1704
|
timer_type: 'timerType',
|
|
1705
|
+
hide_on_league_main_page: 'hideOnLeagueMainPage',
|
|
1705
1706
|
},
|
|
1706
1707
|
relation: {
|
|
1707
1708
|
type: enumField(exports.TournamentTypes),
|
|
@@ -8169,7 +8170,7 @@
|
|
|
8169
8170
|
MediaApi.prototype.getLeagueMedia = function (leagueId, page, size, filters) {
|
|
8170
8171
|
if (filters === void 0) { filters = {}; }
|
|
8171
8172
|
return __awaiter(this, void 0, void 0, function () {
|
|
8172
|
-
var params;
|
|
8173
|
+
var params, statuses;
|
|
8173
8174
|
return __generator(this, function (_a) {
|
|
8174
8175
|
params = new i1.HttpParams().set('page', page.toString()).set('size', size.toString());
|
|
8175
8176
|
if (filters.mediaType) {
|
|
@@ -8181,6 +8182,10 @@
|
|
|
8181
8182
|
if (filters.teamId) {
|
|
8182
8183
|
params = params.set('team_id', filters.teamId.toString());
|
|
8183
8184
|
}
|
|
8185
|
+
if (filters.statuses) {
|
|
8186
|
+
statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
|
|
8187
|
+
params = params.set('statuses', statuses.join(','));
|
|
8188
|
+
}
|
|
8184
8189
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/media/", { params: params, observe: 'response' })
|
|
8185
8190
|
.pipe(operators.map(function (response) { return ({
|
|
8186
8191
|
total: +response.headers.get('X-Page-Count'),
|