@mtgame/core 0.0.43 → 0.0.45

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>;
@@ -1483,6 +1483,7 @@
1483
1483
  tournament_id: 'tournament_id',
1484
1484
  video_url: 'videoUrl',
1485
1485
  video_preview: 'videoPreview',
1486
+ is_live: 'isLive',
1486
1487
  },
1487
1488
  relation: {
1488
1489
  originalPhoto: File,
@@ -1641,6 +1642,7 @@
1641
1642
  tournament_playoff_id: 'tournamentPlayoffId',
1642
1643
  tournament_court: 'tournamentCourt',
1643
1644
  media_count: 'mediaCount',
1645
+ media_live_count: 'mediaLiveCount',
1644
1646
  media: 'media',
1645
1647
  tournament: 'tournament',
1646
1648
  },
@@ -3068,6 +3070,11 @@
3068
3070
  return HockeyGameApi;
3069
3071
  }());
3070
3072
 
3073
+
3074
+ (function (LeagueNewsType) {
3075
+ LeagueNewsType[LeagueNewsType["text"] = 1] = "text";
3076
+ LeagueNewsType[LeagueNewsType["video"] = 2] = "video";
3077
+ })(exports.LeagueNewsType || (exports.LeagueNewsType = {}));
3071
3078
  var LeagueNews = /** @class */ (function (_super) {
3072
3079
  __extends(LeagueNews, _super);
3073
3080
  function LeagueNews() {
@@ -3096,13 +3103,17 @@
3096
3103
  mobile_picture: 'mobilePicture',
3097
3104
  is_main: 'isMain',
3098
3105
  tournaments: 'tournaments',
3106
+ type: 'type',
3107
+ video_link: 'videoLink',
3108
+ tag: 'tag',
3099
3109
  },
3100
3110
  relation: {
3101
3111
  datetime: DateTimeField,
3102
3112
  picture: File,
3103
3113
  cover: File,
3104
3114
  mobilePicture: File,
3105
- tournaments: listField(Tournament)
3115
+ tournaments: listField(Tournament),
3116
+ type: enumField(exports.LeagueNewsType),
3106
3117
  }
3107
3118
  })
3108
3119
  ], LeagueNews);
@@ -3307,12 +3318,14 @@
3307
3318
  this.httpClient = httpClient;
3308
3319
  this.configService = configService;
3309
3320
  }
3310
- LeagueNewsApi.prototype.getLeagueNewsList = function (leagueId, page, size) {
3321
+ LeagueNewsApi.prototype.getLeagueNewsList = function (leagueId, page, size, type) {
3322
+ if (type === void 0) { type = exports.LeagueNewsType.text; }
3311
3323
  return __awaiter(this, void 0, void 0, function () {
3312
3324
  var params;
3313
3325
  return __generator(this, function (_a) {
3314
3326
  params = new http.HttpParams().set('page', page.toString())
3315
- .set('size', size.toString());
3327
+ .set('size', size.toString())
3328
+ .set('type', exports.LeagueNewsType[type]);
3316
3329
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/news/", { params: params, observe: 'response' })
3317
3330
  .pipe(operators.map(function (response) { return ({
3318
3331
  total: +response.headers.get('X-Page-Count'),