@mtgame/core 0.1.19 → 0.1.20
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/bundles/mtgame-core.umd.js +24 -136
- 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/tournament-api.js +9 -66
- package/esm5/api/tournament-api.js +25 -137
- package/fesm2015/mtgame-core.js +8 -65
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +24 -136
- package/fesm5/mtgame-core.js.map +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -5004,33 +5004,10 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5004
5004
|
};
|
|
5005
5005
|
TournamentApi.prototype.getBasketballStatistic = function (filters) {
|
|
5006
5006
|
return __awaiter(this, void 0, void 0, function () {
|
|
5007
|
-
var params
|
|
5008
|
-
|
|
5009
|
-
return __generator(this, function (_d) {
|
|
5007
|
+
var params;
|
|
5008
|
+
return __generator(this, function (_a) {
|
|
5010
5009
|
params = new HttpParams();
|
|
5011
|
-
|
|
5012
|
-
try {
|
|
5013
|
-
for (_a = __values(Object.keys(filters)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5014
|
-
key = _b.value;
|
|
5015
|
-
if (filters[key]) {
|
|
5016
|
-
params = params.set(key, filters[key]);
|
|
5017
|
-
}
|
|
5018
|
-
}
|
|
5019
|
-
}
|
|
5020
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
5021
|
-
finally {
|
|
5022
|
-
try {
|
|
5023
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
5024
|
-
}
|
|
5025
|
-
finally { if (e_6) throw e_6.error; }
|
|
5026
|
-
}
|
|
5027
|
-
if (filters.per_game !== undefined) {
|
|
5028
|
-
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
5029
|
-
}
|
|
5030
|
-
if (filters.tournament_ids) {
|
|
5031
|
-
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5032
|
-
}
|
|
5033
|
-
}
|
|
5010
|
+
params = applyStatisticFilters(filters, params);
|
|
5034
5011
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/basketball_statistic/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5035
5012
|
total: +result.headers.get('X-Page-Count'),
|
|
5036
5013
|
data: BasketballStatistic.toFront(result.body)
|
|
@@ -5040,33 +5017,10 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5040
5017
|
};
|
|
5041
5018
|
TournamentApi.prototype.getVolleyballStatistic = function (filters) {
|
|
5042
5019
|
return __awaiter(this, void 0, void 0, function () {
|
|
5043
|
-
var params
|
|
5044
|
-
|
|
5045
|
-
return __generator(this, function (_d) {
|
|
5020
|
+
var params;
|
|
5021
|
+
return __generator(this, function (_a) {
|
|
5046
5022
|
params = new HttpParams();
|
|
5047
|
-
|
|
5048
|
-
try {
|
|
5049
|
-
for (_a = __values(Object.keys(filters)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5050
|
-
key = _b.value;
|
|
5051
|
-
if (filters[key]) {
|
|
5052
|
-
params = params.set(key, filters[key]);
|
|
5053
|
-
}
|
|
5054
|
-
}
|
|
5055
|
-
}
|
|
5056
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
5057
|
-
finally {
|
|
5058
|
-
try {
|
|
5059
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
5060
|
-
}
|
|
5061
|
-
finally { if (e_7) throw e_7.error; }
|
|
5062
|
-
}
|
|
5063
|
-
if (filters.per_game !== undefined) {
|
|
5064
|
-
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
5065
|
-
}
|
|
5066
|
-
if (filters.tournament_ids) {
|
|
5067
|
-
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5068
|
-
}
|
|
5069
|
-
}
|
|
5023
|
+
params = applyStatisticFilters(filters, params);
|
|
5070
5024
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/volleyball_statistic/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5071
5025
|
total: +result.headers.get('X-Page-Count'),
|
|
5072
5026
|
data: VolleyballStatistic.toFront(result.body)
|
|
@@ -5076,33 +5030,10 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5076
5030
|
};
|
|
5077
5031
|
TournamentApi.prototype.getHockeyStatistic = function (filters) {
|
|
5078
5032
|
return __awaiter(this, void 0, void 0, function () {
|
|
5079
|
-
var params
|
|
5080
|
-
|
|
5081
|
-
return __generator(this, function (_d) {
|
|
5033
|
+
var params;
|
|
5034
|
+
return __generator(this, function (_a) {
|
|
5082
5035
|
params = new HttpParams();
|
|
5083
|
-
|
|
5084
|
-
try {
|
|
5085
|
-
for (_a = __values(Object.keys(filters)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5086
|
-
key = _b.value;
|
|
5087
|
-
if (filters[key]) {
|
|
5088
|
-
params = params.set(key, filters[key]);
|
|
5089
|
-
}
|
|
5090
|
-
}
|
|
5091
|
-
}
|
|
5092
|
-
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
5093
|
-
finally {
|
|
5094
|
-
try {
|
|
5095
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
5096
|
-
}
|
|
5097
|
-
finally { if (e_8) throw e_8.error; }
|
|
5098
|
-
}
|
|
5099
|
-
if (filters.per_game !== undefined) {
|
|
5100
|
-
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
5101
|
-
}
|
|
5102
|
-
if (filters.tournament_ids) {
|
|
5103
|
-
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5104
|
-
}
|
|
5105
|
-
}
|
|
5036
|
+
params = applyStatisticFilters(filters, params);
|
|
5106
5037
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/hockey_statistic/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5107
5038
|
total: +result.headers.get('X-Page-Count'),
|
|
5108
5039
|
data: HockeyStatistic.toFront(result.body)
|
|
@@ -5112,33 +5043,10 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5112
5043
|
};
|
|
5113
5044
|
TournamentApi.prototype.getFootballStatistic = function (filters) {
|
|
5114
5045
|
return __awaiter(this, void 0, void 0, function () {
|
|
5115
|
-
var params
|
|
5116
|
-
|
|
5117
|
-
return __generator(this, function (_d) {
|
|
5046
|
+
var params;
|
|
5047
|
+
return __generator(this, function (_a) {
|
|
5118
5048
|
params = new HttpParams();
|
|
5119
|
-
|
|
5120
|
-
try {
|
|
5121
|
-
for (_a = __values(Object.keys(filters)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5122
|
-
key = _b.value;
|
|
5123
|
-
if (filters[key]) {
|
|
5124
|
-
params = params.set(key, filters[key]);
|
|
5125
|
-
}
|
|
5126
|
-
}
|
|
5127
|
-
}
|
|
5128
|
-
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
5129
|
-
finally {
|
|
5130
|
-
try {
|
|
5131
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
5132
|
-
}
|
|
5133
|
-
finally { if (e_9) throw e_9.error; }
|
|
5134
|
-
}
|
|
5135
|
-
if (filters.per_game !== undefined) {
|
|
5136
|
-
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
5137
|
-
}
|
|
5138
|
-
if (filters.tournament_ids) {
|
|
5139
|
-
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5140
|
-
}
|
|
5141
|
-
}
|
|
5049
|
+
params = applyStatisticFilters(filters, params);
|
|
5142
5050
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/football_statistic/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5143
5051
|
total: +result.headers.get('X-Page-Count'),
|
|
5144
5052
|
data: FootballStatistic.toFront(result.body)
|
|
@@ -5148,33 +5056,10 @@ var TournamentApi = /** @class */ (function () {
|
|
|
5148
5056
|
};
|
|
5149
5057
|
TournamentApi.prototype.getHandballStatistic = function (filters) {
|
|
5150
5058
|
return __awaiter(this, void 0, void 0, function () {
|
|
5151
|
-
var params
|
|
5152
|
-
|
|
5153
|
-
return __generator(this, function (_d) {
|
|
5059
|
+
var params;
|
|
5060
|
+
return __generator(this, function (_a) {
|
|
5154
5061
|
params = new HttpParams();
|
|
5155
|
-
|
|
5156
|
-
try {
|
|
5157
|
-
for (_a = __values(Object.keys(filters)), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
5158
|
-
key = _b.value;
|
|
5159
|
-
if (filters[key]) {
|
|
5160
|
-
params = params.set(key, filters[key]);
|
|
5161
|
-
}
|
|
5162
|
-
}
|
|
5163
|
-
}
|
|
5164
|
-
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
5165
|
-
finally {
|
|
5166
|
-
try {
|
|
5167
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
5168
|
-
}
|
|
5169
|
-
finally { if (e_10) throw e_10.error; }
|
|
5170
|
-
}
|
|
5171
|
-
if (filters.per_game !== undefined) {
|
|
5172
|
-
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
5173
|
-
}
|
|
5174
|
-
if (filters.tournament_ids) {
|
|
5175
|
-
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5176
|
-
}
|
|
5177
|
-
}
|
|
5062
|
+
params = applyStatisticFilters(filters, params);
|
|
5178
5063
|
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/handball_statistic/", { params: params, observe: 'response' }).pipe(map(function (result) { return ({
|
|
5179
5064
|
total: +result.headers.get('X-Page-Count'),
|
|
5180
5065
|
data: HandballStatistic.toFront(result.body)
|
|
@@ -5255,7 +5140,7 @@ function applyGamesFilters(filters, params) {
|
|
|
5255
5140
|
return params;
|
|
5256
5141
|
}
|
|
5257
5142
|
function applyStatisticFilters(filters, params) {
|
|
5258
|
-
var
|
|
5143
|
+
var e_6, _a;
|
|
5259
5144
|
try {
|
|
5260
5145
|
for (var _b = __values(Object.keys(filters)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
5261
5146
|
var key = _c.value;
|
|
@@ -5264,12 +5149,12 @@ function applyStatisticFilters(filters, params) {
|
|
|
5264
5149
|
}
|
|
5265
5150
|
}
|
|
5266
5151
|
}
|
|
5267
|
-
catch (
|
|
5152
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
5268
5153
|
finally {
|
|
5269
5154
|
try {
|
|
5270
5155
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5271
5156
|
}
|
|
5272
|
-
finally { if (
|
|
5157
|
+
finally { if (e_6) throw e_6.error; }
|
|
5273
5158
|
}
|
|
5274
5159
|
if (filters.per_game !== undefined) {
|
|
5275
5160
|
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
@@ -5277,10 +5162,13 @@ function applyStatisticFilters(filters, params) {
|
|
|
5277
5162
|
if (filters.tournament_ids) {
|
|
5278
5163
|
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
5279
5164
|
}
|
|
5165
|
+
if (filters.is_playoff !== undefined && filters.is_playoff !== null) {
|
|
5166
|
+
params = params.set('is_playoff', filters.is_playoff ? '1' : '0');
|
|
5167
|
+
}
|
|
5280
5168
|
return params;
|
|
5281
5169
|
}
|
|
5282
5170
|
function applyStatisticLeadersFilters(filters, params) {
|
|
5283
|
-
var
|
|
5171
|
+
var e_7, _a;
|
|
5284
5172
|
try {
|
|
5285
5173
|
for (var _b = __values(Object.keys(filters)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
5286
5174
|
var key = _c.value;
|
|
@@ -5289,12 +5177,12 @@ function applyStatisticLeadersFilters(filters, params) {
|
|
|
5289
5177
|
}
|
|
5290
5178
|
}
|
|
5291
5179
|
}
|
|
5292
|
-
catch (
|
|
5180
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
5293
5181
|
finally {
|
|
5294
5182
|
try {
|
|
5295
5183
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
5296
5184
|
}
|
|
5297
|
-
finally { if (
|
|
5185
|
+
finally { if (e_7) throw e_7.error; }
|
|
5298
5186
|
}
|
|
5299
5187
|
if (filters.per_game !== undefined) {
|
|
5300
5188
|
params = params.set('per_game', filters.per_game ? '1' : '0');
|