@mtgame/core 0.2.11 → 0.2.13
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 +7 -4
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/media-api.js +5 -1
- package/esm2015/models/waterpolo-game-statistic.js +3 -4
- package/fesm2015/mtgame-core.js +6 -3
- package/fesm2015/mtgame-core.js.map +1 -1
- 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;
|
|
@@ -8170,7 +8170,7 @@
|
|
|
8170
8170
|
MediaApi.prototype.getLeagueMedia = function (leagueId, page, size, filters) {
|
|
8171
8171
|
if (filters === void 0) { filters = {}; }
|
|
8172
8172
|
return __awaiter(this, void 0, void 0, function () {
|
|
8173
|
-
var params;
|
|
8173
|
+
var params, statuses;
|
|
8174
8174
|
return __generator(this, function (_a) {
|
|
8175
8175
|
params = new i1.HttpParams().set('page', page.toString()).set('size', size.toString());
|
|
8176
8176
|
if (filters.mediaType) {
|
|
@@ -8182,6 +8182,10 @@
|
|
|
8182
8182
|
if (filters.teamId) {
|
|
8183
8183
|
params = params.set('team_id', filters.teamId.toString());
|
|
8184
8184
|
}
|
|
8185
|
+
if (filters.statuses) {
|
|
8186
|
+
statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
|
|
8187
|
+
params = params.set('statuses', statuses.join(','));
|
|
8188
|
+
}
|
|
8185
8189
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/media/", { params: params, observe: 'response' })
|
|
8186
8190
|
.pipe(operators.map(function (response) { return ({
|
|
8187
8191
|
total: +response.headers.get('X-Page-Count'),
|
|
@@ -11824,7 +11828,7 @@
|
|
|
11824
11828
|
});
|
|
11825
11829
|
Object.defineProperty(WaterpoloGameStatistic.prototype, "totalShots", {
|
|
11826
11830
|
get: function () {
|
|
11827
|
-
return this.shots +
|
|
11831
|
+
return this.shots + this.shootoutShots;
|
|
11828
11832
|
},
|
|
11829
11833
|
enumerable: false,
|
|
11830
11834
|
configurable: true
|
|
@@ -11929,8 +11933,7 @@
|
|
|
11929
11933
|
});
|
|
11930
11934
|
Object.defineProperty(WaterpoloGameStatistic.prototype, "totalFouls", {
|
|
11931
11935
|
get: function () {
|
|
11932
|
-
return (this.fouls || 0) + (this.
|
|
11933
|
-
(this.minorPenalties || 0) + (this.majorPenalties || 0) + (this.matchPenalties || 0);
|
|
11936
|
+
return (this.fouls || 0) + (this.personalFouls || 0);
|
|
11934
11937
|
},
|
|
11935
11938
|
enumerable: false,
|
|
11936
11939
|
configurable: true
|