UNPKG

sportradar-api-client

Version:

Node and NestJS wrappers for Sportradar feeds

908 lines 47.7 kB
"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.DefaultSportradarNbaApiService = void 0; const common_1 = require("@nestjs/common"); const axios_1 = require("@nestjs/axios"); const configuration_1 = require("../configuration"); let DefaultSportradarNbaApiService = class DefaultSportradarNbaApiService { constructor(httpClient, configuration) { this.httpClient = httpClient; this.basePath = 'https://api.sportradar.com/nba/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); } 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 }); } dailySchedule(locale, year, month, day, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling dailySchedule.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling dailySchedule.'); } if (month === null || month === undefined) { throw new Error('Required parameter month was null or undefined when calling dailySchedule.'); } if (day === null || day === undefined) { throw new Error('Required parameter day was null or undefined when calling dailySchedule.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling dailySchedule.'); } 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(month))}/${encodeURIComponent(String(day))}/schedule.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } dailyTransfers(locale, year, month, day, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling dailyTransfers.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling dailyTransfers.'); } if (month === null || month === undefined) { throw new Error('Required parameter month was null or undefined when calling dailyTransfers.'); } if (day === null || day === undefined) { throw new Error('Required parameter day was null or undefined when calling dailyTransfers.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling dailyTransfers.'); } 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))}/transfers.${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 }); } freeAgents(locale, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling freeAgents.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling freeAgents.'); } 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/free_agents.${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 }); } gameSummary(locale, game_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling gameSummary.'); } if (game_id === null || game_id === undefined) { throw new Error('Required parameter game_id was null or undefined when calling gameSummary.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling gameSummary.'); } 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))}/summary.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } injuries(locale, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling injuries.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling injuries.'); } 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/injuries.${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 }); } leagueLeaders(locale, year, season_type, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling leagueLeaders.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling leagueLeaders.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling leagueLeaders.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling leagueLeaders.'); } 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))}/leaders.${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, game_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling playerProfile.'); } if (game_id === null || game_id === undefined) { throw new Error('Required parameter game_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(game_id))}/profile.${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 }); } rankings(locale, year, season_year, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling rankings.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling rankings.'); } if (season_year === null || season_year === undefined) { throw new Error('Required parameter season_year was null or undefined when calling rankings.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling rankings.'); } 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_year))}/rankings.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } schedule(locale, year, season_type, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling schedule.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling schedule.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling schedule.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling schedule.'); } 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 }); } seriesSchedule(locale, year, season_type, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling seriesSchedule.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling seriesSchedule.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling seriesSchedule.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling seriesSchedule.'); } 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))}/series/${encodeURIComponent(String(year))}/${encodeURIComponent(String(season_type))}/schedule.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } seriesStatistics(locale, series_id, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling seriesStatistics.'); } if (series_id === null || series_id === undefined) { throw new Error('Required parameter series_id was null or undefined when calling seriesStatistics.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling seriesStatistics.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling seriesStatistics.'); } 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))}/series/${encodeURIComponent(String(series_id))}/teams/${encodeURIComponent(String(team_id))}/statistics.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } splitsGame(locale, year, season_type, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling splitsGame.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling splitsGame.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling splitsGame.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling splitsGame.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling splitsGame.'); } 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))}/splits/game.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } splitsHierarchy(locale, year, season_type, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling splitsHierarchy.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling splitsHierarchy.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling splitsHierarchy.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling splitsHierarchy.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling splitsHierarchy.'); } 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))}/splits/hierarchy.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } splitsIngame(locale, year, season_type, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling splitsIngame.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling splitsIngame.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling splitsIngame.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling splitsIngame.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling splitsIngame.'); } 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))}/splits/ingame.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } splitsSchedule(locale, year, season_type, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling splitsSchedule.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling splitsSchedule.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling splitsSchedule.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling splitsSchedule.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling splitsSchedule.'); } 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))}/splits/schedule.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers }); } standings(locale, year, season_type, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling standings.'); } if (year === null || year === undefined) { throw new Error('Required parameter year was null or undefined when calling standings.'); } if (season_type === null || season_type === undefined) { throw new Error('Required parameter season_type was null or undefined when calling standings.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling standings.'); } 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.${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 }); } teamProfileRosters(locale, team_id, format) { if (locale === null || locale === undefined) { throw new Error('Required parameter locale was null or undefined when calling teamProfileRosters.'); } if (team_id === null || team_id === undefined) { throw new Error('Required parameter team_id was null or undefined when calling teamProfileRosters.'); } if (format === null || format === undefined) { throw new Error('Required parameter format was null or undefined when calling teamProfileRosters.'); } 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 }); } 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 }); } }; exports.DefaultSportradarNbaApiService = DefaultSportradarNbaApiService; exports.DefaultSportradarNbaApiService = DefaultSportradarNbaApiService = __decorate([ (0, common_1.Injectable)(), __param(1, (0, common_1.Optional)()), __metadata("design:paramtypes", [axios_1.HttpService, configuration_1.Configuration]) ], DefaultSportradarNbaApiService); //# sourceMappingURL=default.service.js.map