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