@mtgame/core 0.2.95 → 0.2.97

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.
@@ -0,0 +1,13 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Team } from '../models/team';
3
+ interface LeagueTeamFilters {
4
+ tournament_id: number;
5
+ tournament_season_id: number;
6
+ }
7
+ export declare class LeagueTeamApi {
8
+ private httpClient;
9
+ constructor(httpClient: HttpClient);
10
+ getLeagueTeams(filters?: LeagueTeamFilters): Promise<Team[]>;
11
+ getLeagueTeam(teamId: number): Promise<Team>;
12
+ }
13
+ export {};
@@ -8,6 +8,7 @@ export * from './handball-game-api';
8
8
  export * from './league-api';
9
9
  export * from './league-news-api';
10
10
  export * from './league-player-api';
11
+ export * from './league-team-api';
11
12
  export * from './media-api';
12
13
  export * from './notification-api';
13
14
  export * from './notification-base-api';
@@ -8798,6 +8798,44 @@
8798
8798
  { type: ConfigService }
8799
8799
  ]; };
8800
8800
 
8801
+ var LeagueTeamApi = /** @class */ (function () {
8802
+ function LeagueTeamApi(httpClient) {
8803
+ this.httpClient = httpClient;
8804
+ }
8805
+ LeagueTeamApi.prototype.getLeagueTeams = function (filters) {
8806
+ return __awaiter(this, void 0, void 0, function () {
8807
+ var params;
8808
+ return __generator(this, function (_a) {
8809
+ params = new i1.HttpParams();
8810
+ if (filters) {
8811
+ if (filters.tournament_id) {
8812
+ params = params.set('tournament_id', filters.tournament_id);
8813
+ }
8814
+ if (filters.tournament_season_id) {
8815
+ params = params.set('tournament_season_id', filters.tournament_season_id);
8816
+ }
8817
+ }
8818
+ return [2 /*return*/, this.httpClient.get('/api/v1/league_team/', { params: params }).pipe(operators.map(function (response) { return response.map(function (item) { return exports.Team.toFront(item); }); })).toPromise()];
8819
+ });
8820
+ });
8821
+ };
8822
+ LeagueTeamApi.prototype.getLeagueTeam = function (teamId) {
8823
+ return __awaiter(this, void 0, void 0, function () {
8824
+ return __generator(this, function (_a) {
8825
+ return [2 /*return*/, this.httpClient.get("/api/v1/league_team/" + teamId + "/").pipe(operators.map(function (response) { return exports.Team.toFront(response); })).toPromise()];
8826
+ });
8827
+ });
8828
+ };
8829
+ return LeagueTeamApi;
8830
+ }());
8831
+ LeagueTeamApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LeagueTeamApi_Factory() { return new LeagueTeamApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient)); }, token: LeagueTeamApi, providedIn: "root" });
8832
+ LeagueTeamApi.decorators = [
8833
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
8834
+ ];
8835
+ LeagueTeamApi.ctorParameters = function () { return [
8836
+ { type: i1.HttpClient }
8837
+ ]; };
8838
+
8801
8839
  var MediaApi = /** @class */ (function () {
8802
8840
  function MediaApi(httpClient, configService) {
8803
8841
  this.httpClient = httpClient;
@@ -15103,6 +15141,7 @@
15103
15141
  exports.LeagueFieldBaseValue = LeagueFieldBaseValue;
15104
15142
  exports.LeagueNewsApi = LeagueNewsApi;
15105
15143
  exports.LeaguePlayerApi = LeaguePlayerApi;
15144
+ exports.LeagueTeamApi = LeagueTeamApi;
15106
15145
  exports.LocalStorageEngine = LocalStorageEngine;
15107
15146
  exports.MODEL_MAPPING_FIELDS_KEY = MODEL_MAPPING_FIELDS_KEY;
15108
15147
  exports.MODEL_RELATION_KEY = MODEL_RELATION_KEY;