@mtgame/core 0.2.11 → 0.2.12

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,6 +1,6 @@
1
1
  import { HttpClient, HttpParams } from '@angular/common/http';
2
2
  import { MediaItem } from '../models/media-item';
3
- import { Game } from '../models/game';
3
+ import { Game, GameStatuses } from '../models/game';
4
4
  import { PaginatedResponse } from './paginated-response.interface';
5
5
  import { ConfigService } from '../services/config.service';
6
6
  import { TournamentGamesFilters } from './tournament-api';
@@ -11,6 +11,7 @@ export interface MediaFilters {
11
11
  mediaType?: 'photo' | 'video' | 'live_video';
12
12
  sort?: string;
13
13
  teamId?: number;
14
+ statuses?: GameStatuses[];
14
15
  }
15
16
  export declare class MediaApi {
16
17
  private httpClient;
@@ -8170,7 +8170,7 @@
8170
8170
  MediaApi.prototype.getLeagueMedia = function (leagueId, page, size, filters) {
8171
8171
  if (filters === void 0) { filters = {}; }
8172
8172
  return __awaiter(this, void 0, void 0, function () {
8173
- var params;
8173
+ var params, statuses;
8174
8174
  return __generator(this, function (_a) {
8175
8175
  params = new i1.HttpParams().set('page', page.toString()).set('size', size.toString());
8176
8176
  if (filters.mediaType) {
@@ -8182,6 +8182,10 @@
8182
8182
  if (filters.teamId) {
8183
8183
  params = params.set('team_id', filters.teamId.toString());
8184
8184
  }
8185
+ if (filters.statuses) {
8186
+ statuses = filters.statuses.map(function (i) { return exports.GameStatuses[i]; });
8187
+ params = params.set('statuses', statuses.join(','));
8188
+ }
8185
8189
  return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/media/", { params: params, observe: 'response' })
8186
8190
  .pipe(operators.map(function (response) { return ({
8187
8191
  total: +response.headers.get('X-Page-Count'),