@mtgame/core 0.0.19 → 0.0.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/api/hockey-game-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +20 -0
- 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/hockey-game-api.js +18 -2
- package/esm5/api/hockey-game-api.js +22 -2
- package/fesm2015/mtgame-core.js +16 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +20 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/hockey-game-api.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export declare class HockeyGameApi {
|
|
|
14
14
|
getTeamStatistic(gameId: number): Promise<HockeyGameTeamStatistic>;
|
|
15
15
|
getUserStatistic(gameId: number): Promise<HockeyGameStatistic[]>;
|
|
16
16
|
getLogs(gameId: number): Promise<HockeyGameLog[]>;
|
|
17
|
+
downloadProtocol(gameId: number, format: 'pdf' | 'xlsx'): Promise<any>;
|
|
18
|
+
downloadApplication(gameId: number, format: 'pdf' | 'xlsx', type: 'game_user' | 'tournament_user'): Promise<any>;
|
|
17
19
|
}
|
|
@@ -2876,6 +2876,26 @@
|
|
|
2876
2876
|
});
|
|
2877
2877
|
});
|
|
2878
2878
|
};
|
|
2879
|
+
HockeyGameApi.prototype.downloadProtocol = function (gameId, format) {
|
|
2880
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2881
|
+
return __generator(this, function (_a) {
|
|
2882
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_protocol/", {
|
|
2883
|
+
params: new http.HttpParams().set('file_type', format),
|
|
2884
|
+
responseType: 'blob'
|
|
2885
|
+
}).toPromise()];
|
|
2886
|
+
});
|
|
2887
|
+
});
|
|
2888
|
+
};
|
|
2889
|
+
HockeyGameApi.prototype.downloadApplication = function (gameId, format, type) {
|
|
2890
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2891
|
+
return __generator(this, function (_a) {
|
|
2892
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/tournament_hockey_game/" + gameId + "/game_application_file/", {
|
|
2893
|
+
params: new http.HttpParams().set('file_type', format).set('application_type', type),
|
|
2894
|
+
responseType: 'blob'
|
|
2895
|
+
}).toPromise()];
|
|
2896
|
+
});
|
|
2897
|
+
});
|
|
2898
|
+
};
|
|
2879
2899
|
HockeyGameApi.ctorParameters = function () { return [
|
|
2880
2900
|
{ type: http.HttpClient },
|
|
2881
2901
|
{ type: ConfigService }
|