@mtgame/core 0.1.82 → 0.1.85
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/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +35 -27
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/tournament-api.js +9 -1
- package/esm2015/models/football-game-statistic.js +12 -14
- package/esm2015/models/football-statistic.js +3 -3
- package/esm2015/models/volleyball-game-statistic.js +8 -8
- package/esm2015/models/volleyball-statistic.js +6 -6
- package/fesm2015/mtgame-core.js +33 -27
- package/fesm2015/mtgame-core.js.map +1 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +2 -2
package/api/tournament-api.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare class TournamentApi {
|
|
|
97
97
|
getPlayoffGames(playoffId: number, playoffNumber?: string): Promise<Game[]>;
|
|
98
98
|
getGamesStages(tournamentId: number): Promise<GameTimelineStages>;
|
|
99
99
|
getGames(tournamentId: number, page: number, size: number, filters?: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
|
|
100
|
+
getGamesDates(tournamentId: number): Promise<any>;
|
|
100
101
|
getGroups(tournamentId: number): Promise<TournamentGroup[]>;
|
|
101
102
|
getTeams(tournamentId: number, groupId?: number): Promise<TournamentTeam[]>;
|
|
102
103
|
getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
|
|
@@ -4365,14 +4365,14 @@
|
|
|
4365
4365
|
});
|
|
4366
4366
|
Object.defineProperty(FootballGameStatistic.prototype, "shots", {
|
|
4367
4367
|
get: function () {
|
|
4368
|
-
return (this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0);
|
|
4368
|
+
return Math.floor(10 * ((this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0))) / 10;
|
|
4369
4369
|
},
|
|
4370
4370
|
enumerable: false,
|
|
4371
4371
|
configurable: true
|
|
4372
4372
|
});
|
|
4373
4373
|
Object.defineProperty(FootballGameStatistic.prototype, "totalGoals", {
|
|
4374
4374
|
get: function () {
|
|
4375
|
-
return (this.goals || 0) + (this.penaltyGoals || 0) + (this.smallPenaltyGoals || 0);
|
|
4375
|
+
return Math.floor(10 * ((this.goals || 0) + (this.penaltyGoals || 0) + (this.smallPenaltyGoals || 0))) / 10;
|
|
4376
4376
|
},
|
|
4377
4377
|
enumerable: false,
|
|
4378
4378
|
configurable: true
|
|
@@ -4399,7 +4399,7 @@
|
|
|
4399
4399
|
});
|
|
4400
4400
|
Object.defineProperty(FootballGameStatistic.prototype, "penalties", {
|
|
4401
4401
|
get: function () {
|
|
4402
|
-
return (this.penaltyGoals || 0) + (this.penaltyAttempts || 0);
|
|
4402
|
+
return Math.floor(10 * ((this.penaltyGoals || 0) + (this.penaltyAttempts || 0))) / 10;
|
|
4403
4403
|
},
|
|
4404
4404
|
enumerable: false,
|
|
4405
4405
|
configurable: true
|
|
@@ -4409,15 +4409,14 @@
|
|
|
4409
4409
|
if (!this.penaltyAttempts || !this.penaltyGoals) {
|
|
4410
4410
|
return 0;
|
|
4411
4411
|
}
|
|
4412
|
-
|
|
4413
|
-
return Math.round(1000 * this.penaltyGoals / penaltyShots) / 10;
|
|
4412
|
+
return Math.round(1000 * this.penaltyGoals / this.penalties) / 10;
|
|
4414
4413
|
},
|
|
4415
4414
|
enumerable: false,
|
|
4416
4415
|
configurable: true
|
|
4417
4416
|
});
|
|
4418
4417
|
Object.defineProperty(FootballGameStatistic.prototype, "smallPenalties", {
|
|
4419
4418
|
get: function () {
|
|
4420
|
-
return (this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0);
|
|
4419
|
+
return Math.floor(10 * ((this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0))) / 10;
|
|
4421
4420
|
},
|
|
4422
4421
|
enumerable: false,
|
|
4423
4422
|
configurable: true
|
|
@@ -4427,43 +4426,42 @@
|
|
|
4427
4426
|
if (!this.smallPenaltyAttempts || !this.smallPenaltyGoals) {
|
|
4428
4427
|
return 0;
|
|
4429
4428
|
}
|
|
4430
|
-
|
|
4431
|
-
return Math.round(1000 * this.smallPenaltyGoals / smallPenaltyShots) / 10;
|
|
4429
|
+
return Math.round(1000 * this.smallPenaltyGoals / this.smallPenalties) / 10;
|
|
4432
4430
|
},
|
|
4433
4431
|
enumerable: false,
|
|
4434
4432
|
configurable: true
|
|
4435
4433
|
});
|
|
4436
4434
|
Object.defineProperty(FootballGameStatistic.prototype, "shotsAgainst", {
|
|
4437
4435
|
get: function () {
|
|
4438
|
-
return (this.saves || 0) + (this.goalsAgainst || 0);
|
|
4436
|
+
return Math.floor(10 * ((this.saves || 0) + (this.goalsAgainst || 0))) / 10;
|
|
4439
4437
|
},
|
|
4440
4438
|
enumerable: false,
|
|
4441
4439
|
configurable: true
|
|
4442
4440
|
});
|
|
4443
4441
|
Object.defineProperty(FootballGameStatistic.prototype, "penaltyShotsAgainst", {
|
|
4444
4442
|
get: function () {
|
|
4445
|
-
return (this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0);
|
|
4443
|
+
return Math.floor(10 * ((this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0))) / 10;
|
|
4446
4444
|
},
|
|
4447
4445
|
enumerable: false,
|
|
4448
4446
|
configurable: true
|
|
4449
4447
|
});
|
|
4450
4448
|
Object.defineProperty(FootballGameStatistic.prototype, "smallPenaltyShotsAgainst", {
|
|
4451
4449
|
get: function () {
|
|
4452
|
-
return (this.smallPenaltySaves || 0) + (this.smallPenaltyGoalsAgainst || 0);
|
|
4450
|
+
return Math.floor(10 * ((this.smallPenaltySaves || 0) + (this.smallPenaltyGoalsAgainst || 0))) / 10;
|
|
4453
4451
|
},
|
|
4454
4452
|
enumerable: false,
|
|
4455
4453
|
configurable: true
|
|
4456
4454
|
});
|
|
4457
4455
|
Object.defineProperty(FootballGameStatistic.prototype, "totalGoalsAgainst", {
|
|
4458
4456
|
get: function () {
|
|
4459
|
-
return (this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0) + (this.smallPenaltyGoalsAgainst || 0) + (this.autoGoalsAgainst || 0);
|
|
4457
|
+
return Math.floor(10 * ((this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0) + (this.smallPenaltyGoalsAgainst || 0) + (this.autoGoalsAgainst || 0))) / 10;
|
|
4460
4458
|
},
|
|
4461
4459
|
enumerable: false,
|
|
4462
4460
|
configurable: true
|
|
4463
4461
|
});
|
|
4464
4462
|
Object.defineProperty(FootballGameStatistic.prototype, "totalSaves", {
|
|
4465
4463
|
get: function () {
|
|
4466
|
-
return (this.saves || 0) + (this.penaltySaves || 0) + (this.smallPenaltySaves || 0);
|
|
4464
|
+
return Math.floor(10 * ((this.saves || 0) + (this.penaltySaves || 0) + (this.smallPenaltySaves || 0))) / 10;
|
|
4467
4465
|
},
|
|
4468
4466
|
enumerable: false,
|
|
4469
4467
|
configurable: true
|
|
@@ -4580,14 +4578,14 @@
|
|
|
4580
4578
|
});
|
|
4581
4579
|
Object.defineProperty(FootballStatistic.prototype, "penalties", {
|
|
4582
4580
|
get: function () {
|
|
4583
|
-
return (this.penaltyGoals || 0) + (this.penaltyAttempts || 0);
|
|
4581
|
+
return Math.floor(10 * ((this.penaltyGoals || 0) + (this.penaltyAttempts || 0))) / 10;
|
|
4584
4582
|
},
|
|
4585
4583
|
enumerable: false,
|
|
4586
4584
|
configurable: true
|
|
4587
4585
|
});
|
|
4588
4586
|
Object.defineProperty(FootballStatistic.prototype, "smallPenalties", {
|
|
4589
4587
|
get: function () {
|
|
4590
|
-
return (this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0);
|
|
4588
|
+
return Math.floor(10 * ((this.smallPenaltyGoals || 0) + (this.smallPenaltyAttempts || 0))) / 10;
|
|
4591
4589
|
},
|
|
4592
4590
|
enumerable: false,
|
|
4593
4591
|
configurable: true
|
|
@@ -5421,35 +5419,35 @@
|
|
|
5421
5419
|
});
|
|
5422
5420
|
Object.defineProperty(VolleyballStatistic.prototype, "totalReceives", {
|
|
5423
5421
|
get: function () {
|
|
5424
|
-
return this.receives + this.excellentReceives + this.receiveFaults;
|
|
5422
|
+
return Math.floor(10 * (this.receives + this.excellentReceives + this.receiveFaults)) / 10;
|
|
5425
5423
|
},
|
|
5426
5424
|
enumerable: false,
|
|
5427
5425
|
configurable: true
|
|
5428
5426
|
});
|
|
5429
5427
|
Object.defineProperty(VolleyballStatistic.prototype, "totalServeReceives", {
|
|
5430
5428
|
get: function () {
|
|
5431
|
-
return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
|
|
5429
|
+
return Math.floor(10 * (this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults)) / 10;
|
|
5432
5430
|
},
|
|
5433
5431
|
enumerable: false,
|
|
5434
5432
|
configurable: true
|
|
5435
5433
|
});
|
|
5436
5434
|
Object.defineProperty(VolleyballStatistic.prototype, "totalServes", {
|
|
5437
5435
|
get: function () {
|
|
5438
|
-
return this.serveAces + this.serveHits + this.serveFaults;
|
|
5436
|
+
return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
|
|
5439
5437
|
},
|
|
5440
5438
|
enumerable: false,
|
|
5441
5439
|
configurable: true
|
|
5442
5440
|
});
|
|
5443
5441
|
Object.defineProperty(VolleyballStatistic.prototype, "totalAttacks", {
|
|
5444
5442
|
get: function () {
|
|
5445
|
-
return this.attackSpikes + this.attackShots + this.attackFaults;
|
|
5443
|
+
return Math.floor(10 * (this.attackSpikes + this.attackShots + this.attackFaults)) / 10;
|
|
5446
5444
|
},
|
|
5447
5445
|
enumerable: false,
|
|
5448
5446
|
configurable: true
|
|
5449
5447
|
});
|
|
5450
5448
|
Object.defineProperty(VolleyballStatistic.prototype, "totalBlocks", {
|
|
5451
5449
|
get: function () {
|
|
5452
|
-
return this.stuffBlocks + this.blockRebounds + this.blockFaults;
|
|
5450
|
+
return Math.floor(10 * (this.stuffBlocks + this.blockRebounds + this.blockFaults)) / 10;
|
|
5453
5451
|
},
|
|
5454
5452
|
enumerable: false,
|
|
5455
5453
|
configurable: true
|
|
@@ -5936,6 +5934,16 @@
|
|
|
5936
5934
|
});
|
|
5937
5935
|
});
|
|
5938
5936
|
};
|
|
5937
|
+
TournamentApi.prototype.getGamesDates = function (tournamentId) {
|
|
5938
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
5939
|
+
return __generator(this, function (_a) {
|
|
5940
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament/" + tournamentId + "/games_dates/", { observe: 'response' }).pipe(operators.map(function (result) { return ({
|
|
5941
|
+
total: +result.headers.get('X-Page-Count'),
|
|
5942
|
+
data: result.body
|
|
5943
|
+
}); })).toPromise()];
|
|
5944
|
+
});
|
|
5945
|
+
});
|
|
5946
|
+
};
|
|
5939
5947
|
TournamentApi.prototype.getGroups = function (tournamentId) {
|
|
5940
5948
|
return __awaiter(this, void 0, void 0, function () {
|
|
5941
5949
|
return __generator(this, function (_a) {
|
|
@@ -9255,49 +9263,49 @@
|
|
|
9255
9263
|
});
|
|
9256
9264
|
Object.defineProperty(VolleyballGameStatistic.prototype, "attacks", {
|
|
9257
9265
|
get: function () {
|
|
9258
|
-
return this.attackSpikes + this.attackShots;
|
|
9266
|
+
return Math.floor(10 * (this.attackSpikes + this.attackShots)) / 10;
|
|
9259
9267
|
},
|
|
9260
9268
|
enumerable: false,
|
|
9261
9269
|
configurable: true
|
|
9262
9270
|
});
|
|
9263
9271
|
Object.defineProperty(VolleyballGameStatistic.prototype, "blocks", {
|
|
9264
9272
|
get: function () {
|
|
9265
|
-
return this.stuffBlocks + this.blockRebounds;
|
|
9273
|
+
return Math.floor(10 * (this.stuffBlocks + this.blockRebounds)) / 10;
|
|
9266
9274
|
},
|
|
9267
9275
|
enumerable: false,
|
|
9268
9276
|
configurable: true
|
|
9269
9277
|
});
|
|
9270
9278
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalReceives", {
|
|
9271
9279
|
get: function () {
|
|
9272
|
-
return this.receives + this.excellentReceives + this.receiveFaults;
|
|
9280
|
+
return Math.floor(10 * (this.receives + this.excellentReceives + this.receiveFaults)) / 10;
|
|
9273
9281
|
},
|
|
9274
9282
|
enumerable: false,
|
|
9275
9283
|
configurable: true
|
|
9276
9284
|
});
|
|
9277
9285
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalServeReceives", {
|
|
9278
9286
|
get: function () {
|
|
9279
|
-
return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
|
|
9287
|
+
return Math.floor(10 * (this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults)) / 10;
|
|
9280
9288
|
},
|
|
9281
9289
|
enumerable: false,
|
|
9282
9290
|
configurable: true
|
|
9283
9291
|
});
|
|
9284
9292
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalServes", {
|
|
9285
9293
|
get: function () {
|
|
9286
|
-
return this.serveAces + this.serveHits + this.serveFaults;
|
|
9294
|
+
return Math.floor(10 * (this.serveAces + this.serveHits + this.serveFaults)) / 10;
|
|
9287
9295
|
},
|
|
9288
9296
|
enumerable: false,
|
|
9289
9297
|
configurable: true
|
|
9290
9298
|
});
|
|
9291
9299
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalAttacks", {
|
|
9292
9300
|
get: function () {
|
|
9293
|
-
return this.attackSpikes + this.attackShots + this.attackFaults;
|
|
9301
|
+
return Math.floor(10 * (this.attackSpikes + this.attackShots + this.attackFaults)) / 10;
|
|
9294
9302
|
},
|
|
9295
9303
|
enumerable: false,
|
|
9296
9304
|
configurable: true
|
|
9297
9305
|
});
|
|
9298
9306
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalBlocks", {
|
|
9299
9307
|
get: function () {
|
|
9300
|
-
return this.stuffBlocks + this.blockRebounds + this.blockFaults;
|
|
9308
|
+
return Math.floor(10 * (this.stuffBlocks + this.blockRebounds + this.blockFaults)) / 10;
|
|
9301
9309
|
},
|
|
9302
9310
|
enumerable: false,
|
|
9303
9311
|
configurable: true
|