@mtgame/core 0.0.44 → 0.0.46

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.
@@ -1,12 +1,12 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { ConfigService } from '../services/config.service';
3
3
  import { PaginatedResponse } from './paginated-response.interface';
4
- import { LeagueNews } from '../models/league-news';
4
+ import { LeagueNews, LeagueNewsType } from '../models/league-news';
5
5
  export declare class LeagueNewsApi {
6
6
  private httpClient;
7
7
  private configService;
8
8
  constructor(httpClient: HttpClient, configService: ConfigService);
9
- getLeagueNewsList(leagueId: number, page: number, size: number): Promise<PaginatedResponse<LeagueNews[]>>;
9
+ getLeagueNewsList(leagueId: number, page: number, size: number, type?: LeagueNewsType): Promise<PaginatedResponse<LeagueNews[]>>;
10
10
  getMainLeagueNews(leagueId: number): Promise<LeagueNews>;
11
11
  getMainLeagueNewsList(leagueId: number): Promise<LeagueNews[]>;
12
12
  getNewsById(newsId: number): Promise<LeagueNews>;
@@ -1221,6 +1221,7 @@
1221
1221
  volleyball_statistic_type: 'volleyballStatisticType',
1222
1222
  shot_clock_enabled: 'shotClockEnabled',
1223
1223
  game_time_type: 'gameTimeType',
1224
+ with_result_table: 'withResultTable'
1224
1225
  },
1225
1226
  relation: {
1226
1227
  type: enumField(exports.TournamentTypes),
@@ -1642,6 +1643,7 @@
1642
1643
  tournament_playoff_id: 'tournamentPlayoffId',
1643
1644
  tournament_court: 'tournamentCourt',
1644
1645
  media_count: 'mediaCount',
1646
+ media_live_count: 'mediaLiveCount',
1645
1647
  media: 'media',
1646
1648
  tournament: 'tournament',
1647
1649
  },
@@ -3069,6 +3071,11 @@
3069
3071
  return HockeyGameApi;
3070
3072
  }());
3071
3073
 
3074
+
3075
+ (function (LeagueNewsType) {
3076
+ LeagueNewsType[LeagueNewsType["text"] = 1] = "text";
3077
+ LeagueNewsType[LeagueNewsType["video"] = 2] = "video";
3078
+ })(exports.LeagueNewsType || (exports.LeagueNewsType = {}));
3072
3079
  var LeagueNews = /** @class */ (function (_super) {
3073
3080
  __extends(LeagueNews, _super);
3074
3081
  function LeagueNews() {
@@ -3097,13 +3104,17 @@
3097
3104
  mobile_picture: 'mobilePicture',
3098
3105
  is_main: 'isMain',
3099
3106
  tournaments: 'tournaments',
3107
+ type: 'type',
3108
+ video_link: 'videoLink',
3109
+ tag: 'tag',
3100
3110
  },
3101
3111
  relation: {
3102
3112
  datetime: DateTimeField,
3103
3113
  picture: File,
3104
3114
  cover: File,
3105
3115
  mobilePicture: File,
3106
- tournaments: listField(Tournament)
3116
+ tournaments: listField(Tournament),
3117
+ type: enumField(exports.LeagueNewsType),
3107
3118
  }
3108
3119
  })
3109
3120
  ], LeagueNews);
@@ -3308,12 +3319,14 @@
3308
3319
  this.httpClient = httpClient;
3309
3320
  this.configService = configService;
3310
3321
  }
3311
- LeagueNewsApi.prototype.getLeagueNewsList = function (leagueId, page, size) {
3322
+ LeagueNewsApi.prototype.getLeagueNewsList = function (leagueId, page, size, type) {
3323
+ if (type === void 0) { type = exports.LeagueNewsType.text; }
3312
3324
  return __awaiter(this, void 0, void 0, function () {
3313
3325
  var params;
3314
3326
  return __generator(this, function (_a) {
3315
3327
  params = new http.HttpParams().set('page', page.toString())
3316
- .set('size', size.toString());
3328
+ .set('size', size.toString())
3329
+ .set('type', exports.LeagueNewsType[type]);
3317
3330
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/news/", { params: params, observe: 'response' })
3318
3331
  .pipe(operators.map(function (response) { return ({
3319
3332
  total: +response.headers.get('X-Page-Count'),