sportradar-api-client
Version:
Node and NestJS wrappers for Sportradar feeds
768 lines • 40.2 kB
JavaScript
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultSportradarNflApiService = void 0;
const common_1 = require("@nestjs/common");
const axios_1 = require("@nestjs/axios");
const configuration_1 = require("../configuration");
let DefaultSportradarNflApiService = class DefaultSportradarNflApiService {
constructor(httpClient, configuration) {
this.httpClient = httpClient;
this.basePath = 'https://api.sportradar.com/nfl/production/v7';
this.defaultHeaders = {};
this.configuration = new configuration_1.Configuration();
this.configuration = configuration || this.configuration;
this.basePath = (configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || this.basePath;
}
canConsumeForm(consumes) {
const form = 'multipart/form-data';
return consumes.includes(form);
}
currentSeasonSchedule(locale, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling currentSeasonSchedule.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling currentSeasonSchedule.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/current_season/schedule.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
currentWeekSchedule(locale, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling currentWeekSchedule.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling currentWeekSchedule.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/current_week/schedule.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
dailyChangeLog(locale, year, month, day, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling dailyChangeLog.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling dailyChangeLog.');
}
if (month === null || month === undefined) {
throw new Error('Required parameter month was null or undefined when calling dailyChangeLog.');
}
if (day === null || day === undefined) {
throw new Error('Required parameter day was null or undefined when calling dailyChangeLog.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling dailyChangeLog.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/league/${encodeURIComponent(String(year))}/${encodeURIComponent(String(month))}/${encodeURIComponent(String(day))}/changes.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
dailyTransactions(locale, year, month, day, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling dailyTransactions.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling dailyTransactions.');
}
if (month === null || month === undefined) {
throw new Error('Required parameter month was null or undefined when calling dailyTransactions.');
}
if (day === null || day === undefined) {
throw new Error('Required parameter day was null or undefined when calling dailyTransactions.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling dailyTransactions.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/league/${encodeURIComponent(String(year))}/${encodeURIComponent(String(month))}/${encodeURIComponent(String(day))}/transactions.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
draftSummary(locale, year, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling draftSummary.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling draftSummary.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling draftSummary.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/draft.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
gameBoxscore(locale, game_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling gameBoxscore.');
}
if (game_id === null || game_id === undefined) {
throw new Error('Required parameter game_id was null or undefined when calling gameBoxscore.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling gameBoxscore.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/boxscore.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
gameRoster(locale, game_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling gameRoster.');
}
if (game_id === null || game_id === undefined) {
throw new Error('Required parameter game_id was null or undefined when calling gameRoster.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling gameRoster.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/roster.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
gameStatistics(locale, game_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling gameStatistics.');
}
if (game_id === null || game_id === undefined) {
throw new Error('Required parameter game_id was null or undefined when calling gameStatistics.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling gameStatistics.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/statistics.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
leagueHierarchy(locale, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling leagueHierarchy.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling leagueHierarchy.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/league/hierarchy.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
playByPlay(locale, game_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling playByPlay.');
}
if (game_id === null || game_id === undefined) {
throw new Error('Required parameter game_id was null or undefined when calling playByPlay.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling playByPlay.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/pbp.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
playerProfile(locale, player_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling playerProfile.');
}
if (player_id === null || player_id === undefined) {
throw new Error('Required parameter player_id was null or undefined when calling playerProfile.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling playerProfile.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/players/${encodeURIComponent(String(player_id))}/profile.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
postgameStandings(locale, year, season_type, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling postgameStandings.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling postgameStandings.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling postgameStandings.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling postgameStandings.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/seasons/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/standings/season.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
prospects(locale, year, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling prospects.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling prospects.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling prospects.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/prospects.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
seasonSchedule(locale, year, season_type, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling seasonSchedule.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling seasonSchedule.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling seasonSchedule.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling seasonSchedule.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/schedule.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
seasonalStatistics(locale, year, season_type, team_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling seasonalStatistics.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling seasonalStatistics.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling seasonalStatistics.');
}
if (team_id === null || team_id === undefined) {
throw new Error('Required parameter team_id was null or undefined when calling seasonalStatistics.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling seasonalStatistics.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/seasons/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/teams/${encodeURIComponent(String(team_id))}/statistics.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
seasons(locale, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling seasons.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling seasons.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/league/seasons.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
teamDraftSummary(locale, year, team_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling teamDraftSummary.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling teamDraftSummary.');
}
if (team_id === null || team_id === undefined) {
throw new Error('Required parameter team_id was null or undefined when calling teamDraftSummary.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling teamDraftSummary.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/teams/${encodeURIComponent(String(team_id))}/draft.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
teamProfile(locale, team_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling teamProfile.');
}
if (team_id === null || team_id === undefined) {
throw new Error('Required parameter team_id was null or undefined when calling teamProfile.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling teamProfile.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/teams/${encodeURIComponent(String(team_id))}/profile.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
teamRoster(locale, team_id, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling teamRoster.');
}
if (team_id === null || team_id === undefined) {
throw new Error('Required parameter team_id was null or undefined when calling teamRoster.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling teamRoster.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/teams/${encodeURIComponent(String(team_id))}/full_roster.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
topProspects(locale, year, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling topProspects.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling topProspects.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling topProspects.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/top_prospects.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
trades(locale, year, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling trades.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling trades.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling trades.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/trades.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
weeklyDepthCharts(locale, year, season_type, week_number, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling weeklyDepthCharts.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling weeklyDepthCharts.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling weeklyDepthCharts.');
}
if (week_number === null || week_number === undefined) {
throw new Error('Required parameter week_number was null or undefined when calling weeklyDepthCharts.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling weeklyDepthCharts.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/seasons/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/${encodeURIComponent(String(week_number))}/depth_charts.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
weeklyInjuries(locale, year, season_type, week_number, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling weeklyInjuries.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling weeklyInjuries.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling weeklyInjuries.');
}
if (week_number === null || week_number === undefined) {
throw new Error('Required parameter week_number was null or undefined when calling weeklyInjuries.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling weeklyInjuries.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/seasons/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/${encodeURIComponent(String(week_number))}/injuries.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
weeklySchedule(locale, year, season_type, week_number, format) {
if (locale === null || locale === undefined) {
throw new Error('Required parameter locale was null or undefined when calling weeklySchedule.');
}
if (year === null || year === undefined) {
throw new Error('Required parameter year was null or undefined when calling weeklySchedule.');
}
if (season_type === null || season_type === undefined) {
throw new Error('Required parameter season_type was null or undefined when calling weeklySchedule.');
}
if (week_number === null || week_number === undefined) {
throw new Error('Required parameter week_number was null or undefined when calling weeklySchedule.');
}
if (format === null || format === undefined) {
throw new Error('Required parameter format was null or undefined when calling weeklySchedule.');
}
let headers = { ...this.defaultHeaders };
let queryParameters = new URLSearchParams();
if (this.configuration.apiKeys["api_key"]) {
queryParameters.append('api_key', this.configuration.apiKeys["api_key"]);
}
let httpHeaderAccepts = [
'application/json'
];
const httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected != undefined) {
headers['Accept'] = httpHeaderAcceptSelected;
}
const consumes = [];
return this.httpClient.get(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/${encodeURIComponent(String(week_number))}/schedule.${encodeURIComponent(String(format))}`, {
withCredentials: this.configuration.withCredentials,
params: queryParameters,
headers: headers
});
}
};
exports.DefaultSportradarNflApiService = DefaultSportradarNflApiService;
exports.DefaultSportradarNflApiService = DefaultSportradarNflApiService = __decorate([
(0, common_1.Injectable)(),
__param(1, (0, common_1.Optional)()),
__metadata("design:paramtypes", [axios_1.HttpService, configuration_1.Configuration])
], DefaultSportradarNflApiService);
//# sourceMappingURL=default.service.js.map