UNPKG

sportradar-api-client

Version:

Node and NestJS wrappers for Sportradar feeds

1,012 lines (875 loc) 65.6 kB
/** * Sportradar NFL API * Sportradar’s NFL API v7 offers a comprehensive suite of game and seasonal stats. Whether you are looking for the fastest gameday updates, your favorite player’s season stats, or in-depth subjective statistics, Sportradar has you covered. All game data feeds update in real-time as games are played and are compiled via expert Sportradar in-house operators. All NFL games – including preseason – feature full coverage. Primary feeds will return schedules, standings, team/player data, and real-time scores. Additional feeds provide a host of complimentary stats, including: * Team rosters * Depth charts * Weekly injuries * Seasonal statistics * Subjective statistics * Draft information Real-time customers are also offered four delivery Push Feeds to enhance speed. The easiest way to get started with the API is to click the fork button to fork this collection to your own workspace and use Postman to send requests. # Overview 1. You need a valid API Key to send requests to the API endpoints. You can get your free trial key by registering an account and creating an application from our [Developer Portal](https://developer.sportradar.com/). 2. Once you have your sport specific key, replace the value `{Your API Key}` with your API key and click the save icon (or click the Meatballs Menu and select \"Save\") 3. By default, responses to every request are sent in JSON. If you prefer XML, you can change the variable by clicking the \"Variables\" tab and replacing the Current Value for format to xml. 4. Select an endpoint from the NFL v7 menu on the left, then click \"Send\" on the resulting screen. 5. The API calls will respond with appropriate [HTTP response codes](https://developer.sportradar.com/docs/read/Home#http-response-codes) for all requests. Within Postman Client, when a response is received, the status code is highlighted and is accompanied by a help text that indicates the possible meaning of the response code. A 200 OK indicates all went well, while 4XX or 5XX response codes indicate an error from the requesting client or our API servers respectively. 6. Data for the requested endpoint is displayed in the Body section below. # Other Resources The [API Map](https://developer.sportradar.com/docs/read/american_football/NFL_v7#nfl-v7-api-map) on our Developer Portal illustrates how to obtain the parameters you will need to access the API. The [Statistics Summary](https://developer.sportradar.com/files/Sportradar_NFL_v7_Statistics_Summary.pdf) provides a high-level overview of all the data points provided within the whole API, giving you an “at a glance” view of the data we offer. The [Documentation](https://developer.sportradar.com/files/Sportradar_NFL_v7_Statistics_Feeds.pdf) provides a list of endpoints for the API with basic descriptions. When applicable, we include information on the Coverage Levels provided for the API. This document also includes descriptions of each data point and information about where each data point can be found within the API. [Frequently Asked Questions](https://developer.sportradar.com/docs/read/american_football/NFL_v7#frequently-asked-questions) about the API can be found on the Developer Portal and in the Documentation mentioned above. The [Change Log](https://developer.sportradar.com/files/NFL_API_v7_Change_Log.pdf) provides a list of changes and updates to this version of the API since the initial release of the API version. If you need further information, contact our support team: Email: [support@sportradar.com](mailto:support@sportradar.com) * * The version of the OpenAPI document: 8 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@nestjs/common'; import { HttpService } from '@nestjs/axios'; import { AxiosResponse } from 'axios'; import { Observable } from 'rxjs'; import { Configuration } from '../configuration'; import { DefaultSportradarNflApiServiceInterface } from './default.serviceInterface'; @Injectable() export class DefaultSportradarNflApiService implements DefaultSportradarNflApiServiceInterface { protected basePath = 'https://api.sportradar.com/nfl/production/v7'; public defaultHeaders: Record<string,string> = {}; public configuration = new Configuration(); constructor(protected httpClient: HttpService, @Optional() configuration: Configuration) { this.configuration = configuration || this.configuration; this.basePath = configuration?.basePath || this.basePath; } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ private canConsumeForm(consumes: string[]): boolean { const form = 'multipart/form-data'; return consumes.includes(form); } /** * Current Season Schedule * Provides schedule information for the current season, including venue and broadcast info, and scoring results by quarter. * @param locale (Required) Locale used for translations * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public currentSeasonSchedule(locale: string, format: string, ): Observable<AxiosResponse<any>>; public currentSeasonSchedule(locale: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/current_season/schedule.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Current Week Schedule * Provides schedule information for the current week, including venue and broadcast info, and scoring results by quarter. * @param locale (Required) Locale used for translations * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public currentWeekSchedule(locale: string, format: string, ): Observable<AxiosResponse<any>>; public currentWeekSchedule(locale: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/current_week/schedule.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Daily Change Log * Provides IDs and timestamps for teams, players, game statistics, schedules, and standings that have been modified on a given date. To receive the data updates, use these unique IDs to pull relevant API feeds. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param month (Required) Month in 2 digit format * @param day (Required) Day in 2 digit format * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public dailyChangeLog(locale: string, year: number, month: number, day: number, format: string, ): Observable<AxiosResponse<any>>; public dailyChangeLog(locale: string, year: number, month: number, day: number, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 } ); } /** * Daily Transactions * Provides IDs and timestamps for teams, players, game statistics, schedules, and standings that have been modified on a given date. To receive the data updates, use these unique IDs to pull relevant API feeds. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param month (Required) Month in 2 digit format * @param day (Required) Day in 2 digit format * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public dailyTransactions(locale: string, year: number, month: number, day: number, format: string, ): Observable<AxiosResponse<any>>; public dailyTransactions(locale: string, year: number, month: number, day: number, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 } ); } /** * Draft Summary * Provides pre-draft pick order with live pick selections during the draft. Displays information on draft rounds, picks, teams, and prospects for a given draft year. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public draftSummary(locale: string, year: number, format: string, ): Observable<AxiosResponse<any>>; public draftSummary(locale: string, year: number, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/draft.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Game Boxscore * Provides game scoring information for each team, including complete play-by-play information for all scoring drives. * @param locale (Required) Locale used for translations * @param game_id (Required) ID of a game * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public gameBoxscore(locale: string, game_id: string, format: string, ): Observable<AxiosResponse<any>>; public gameBoxscore(locale: string, game_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/boxscore.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Game Roster * Provides complete game roster information for each team, including game status and player profile data. * @param locale (Required) Locale used for translations * @param game_id (Required) ID of a game * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public gameRoster(locale: string, game_id: string, format: string, ): Observable<AxiosResponse<any>>; public gameRoster(locale: string, game_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/roster.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Game Statistics * Provides extensive team and player level game statistics for each team. * @param locale (Required) Locale used for translations * @param game_id (Required) ID of a game * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public gameStatistics(locale: string, game_id: string, format: string, ): Observable<AxiosResponse<any>>; public gameStatistics(locale: string, game_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/statistics.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * League Hierarchy * Provides top-level information for each team, including conference and division distinction, venue information, and team colors. * @param locale (Required) Locale used for translations * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public leagueHierarchy(locale: string, format: string, ): Observable<AxiosResponse<any>>; public leagueHierarchy(locale: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/league/hierarchy.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Play By Play * Provides a live play-by-play timeline, including possession and location information as well as all team and player statistics earned on each play. * @param locale (Required) Locale used for translations * @param game_id (Required) ID of a game * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public playByPlay(locale: string, game_id: string, format: string, ): Observable<AxiosResponse<any>>; public playByPlay(locale: string, game_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/games/${encodeURIComponent(String(game_id))}/pbp.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Player Profile * Provides player biographical information, draft information, and seasonal statistics for the regular season and postseason. * @param locale (Required) Locale used for translations * @param player_id (Required) ID of a player * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public playerProfile(locale: string, player_id: string, format: string, ): Observable<AxiosResponse<any>>; public playerProfile(locale: string, player_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/players/${encodeURIComponent(String(player_id))}/profile.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Postgame Standings * Provides standings information for each team, updated postgame. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param season_type (Required) Season type as Preseason (PRE), Regular (REG), or Postseason (PST) * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public postgameStandings(locale: string, year: number, season_type: string, format: string, ): Observable<AxiosResponse<any>>; public postgameStandings(locale: string, year: number, season_type: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 * Provides a list of upcoming or historical draft prospects for a given year. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public prospects(locale: string, year: number, format: string, ): Observable<AxiosResponse<any>>; public prospects(locale: string, year: number, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/${encodeURIComponent(String(year))}/prospects.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Season Schedule * Provides complete schedule information for a given season, including venue and broadcast info, and scoring results by quarter. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param season_type (Required) Season type as Preseason (PRE), Regular (REG), or Postseason (PST) * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public seasonSchedule(locale: string, year: number, season_type: string, format: string, ): Observable<AxiosResponse<any>>; public seasonSchedule(locale: string, year: number, season_type: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 } ); } /** * Seasonal Statistics * Provides complete team and player seasonal statistics for a given season and season type. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param season_type (Required) Season type as Preseason (PRE), Regular (REG), or Postseason (PST) * @param team_id (Required) ID of a team * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public seasonalStatistics(locale: string, year: number, season_type: string, team_id: string, format: string, ): Observable<AxiosResponse<any>>; public seasonalStatistics(locale: string, year: number, season_type: string, team_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 * Provides a list of all available seasons, including preseasons and postseasons. * @param locale (Required) Locale used for translations * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public seasons(locale: string, format: string, ): Observable<AxiosResponse<any>>; public seasons(locale: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/league/seasons.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Team Draft Summary * Provides pre-draft pick order with live pick selections during the draft for a given team. * @param locale (Required) Locale used for translations * @param year (Required) Year in 4 digit format * @param team_id (Required) ID of a team * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public teamDraftSummary(locale: string, year: number, team_id: string, format: string, ): Observable<AxiosResponse<any>>; public teamDraftSummary(locale: string, year: number, team_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${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 } ); } /** * Team Profile * Provides franchise team information, as well as a roster of active players. * @param locale (Required) Locale used for translations * @param team_id (Required) ID of a team * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public teamProfile(locale: string, team_id: string, format: string, ): Observable<AxiosResponse<any>>; public teamProfile(locale: string, team_id: string, format: string, ): Observable<any> { 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}; // authentication (apikeyAuth) required let queryParameters = new URLSearchParams(); if (this.configuration.apiKeys["api_key"]) { queryParameters.append('api_key', this.configuration.apiKeys["api_key"]); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers['Accept'] = httpHeaderAcceptSelected; } // to determine the Content-Type header const consumes: string[] = [ ]; return this.httpClient.get<any>(`${this.basePath}/${encodeURIComponent(String(locale))}/teams/${encodeURIComponent(String(team_id))}/profile.${encodeURIComponent(String(format))}`, { withCredentials: this.configuration.withCredentials, params: queryParameters, headers: headers } ); } /** * Team Roster * Provides franchise team information, as well as the complete roster of players. * @param locale (Required) Locale used for translations * @param team_id (Required) ID of a team * @param format * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public teamRoster(loca