diff --git a/integration-tests/2016-season/__snapshots__/integration.test.js.snap b/integration-tests/2016-season/__snapshots__/integration.test.js.snap index ed962a8..6733588 100644 --- a/integration-tests/2016-season/__snapshots__/integration.test.js.snap +++ b/integration-tests/2016-season/__snapshots__/integration.test.js.snap @@ -3560,6 +3560,7 @@ exports[`2016 season integration tests getNFLGamesForPeriod returns a populated "team": "Minnesota Vikings", "teamAbbrev": "MIN", }, + "odds": [], "quarter": 4, "startTime": 2016-10-04T00:30:00.000Z, }, @@ -3581,6 +3582,7 @@ exports[`2016 season integration tests getNFLGamesForPeriod returns a populated "team": "San Francisco 49ers", "teamAbbrev": "SF", }, + "odds": [], "quarter": 4, "startTime": 2016-10-07T00:25:00.000Z, }, diff --git a/integration-tests/2018-season/__snapshots__/integration.test.js.snap b/integration-tests/2018-season/__snapshots__/integration.test.js.snap index db1b7d4..0ca0dcb 100644 --- a/integration-tests/2018-season/__snapshots__/integration.test.js.snap +++ b/integration-tests/2018-season/__snapshots__/integration.test.js.snap @@ -91489,7 +91489,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Indianapolis Colts", "teamAbbrev": "IND", }, - "broadcaster": "FOX/NFL NET", + "broadcaster": "FOX/NFL Net", "clock": "0:00", "gameStatus": "Final", "homeTeam": { @@ -91499,6 +91499,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "New England Patriots", "teamAbbrev": "NE", }, + "odds": [], "quarter": 4, "startTime": 2018-10-05T00:20:00.000Z, }, @@ -91520,6 +91521,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Buffalo Bills", "teamAbbrev": "BUF", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91541,6 +91543,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Cincinnati Bengals", "teamAbbrev": "CIN", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91562,6 +91565,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Cleveland Browns", "teamAbbrev": "CLE", }, + "odds": [], "quarter": 5, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91583,6 +91587,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Detroit Lions", "teamAbbrev": "DET", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91604,6 +91609,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Kansas City Chiefs", "teamAbbrev": "KC", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91625,6 +91631,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "New York Jets", "teamAbbrev": "NYJ", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91646,6 +91653,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Pittsburgh Steelers", "teamAbbrev": "PIT", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91667,6 +91675,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Carolina Panthers", "teamAbbrev": "CAR", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -91688,6 +91697,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Los Angeles Chargers", "teamAbbrev": "LAC", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:05:00.000Z, }, @@ -91709,6 +91719,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Philadelphia Eagles", "teamAbbrev": "PHI", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -91730,6 +91741,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "San Francisco 49ers", "teamAbbrev": "SF", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -91751,6 +91763,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Seattle Seahawks", "teamAbbrev": "SEA", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -91772,6 +91785,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "Houston Texans", "teamAbbrev": "HOU", }, + "odds": [], "quarter": 5, "startTime": 2018-10-08T00:20:00.000Z, }, @@ -91793,6 +91807,7 @@ exports[`2018 season client integration tests getNFLGamesForPeriod returns a pop "team": "New Orleans Saints", "teamAbbrev": "NO", }, + "odds": [], "quarter": 4, "startTime": 2018-10-09T00:15:00.000Z, }, diff --git a/integration-tests/2022-season/__snapshots__/integration.test.js.snap b/integration-tests/2022-season/__snapshots__/integration.test.js.snap index 5204831..e001d62 100644 --- a/integration-tests/2022-season/__snapshots__/integration.test.js.snap +++ b/integration-tests/2022-season/__snapshots__/integration.test.js.snap @@ -100126,7 +100126,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Indianapolis Colts", "teamAbbrev": "IND", }, - "broadcaster": "FOX/NFL NET", + "broadcaster": "FOX/NFL Net", "clock": "0:00", "gameStatus": "Final", "homeTeam": { @@ -100136,6 +100136,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "New England Patriots", "teamAbbrev": "NE", }, + "odds": [], "quarter": 4, "startTime": 2018-10-05T00:20:00.000Z, }, @@ -100157,6 +100158,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Buffalo Bills", "teamAbbrev": "BUF", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100178,6 +100180,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Cincinnati Bengals", "teamAbbrev": "CIN", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100199,6 +100202,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Cleveland Browns", "teamAbbrev": "CLE", }, + "odds": [], "quarter": 5, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100220,6 +100224,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Detroit Lions", "teamAbbrev": "DET", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100241,6 +100246,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Kansas City Chiefs", "teamAbbrev": "KC", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100262,6 +100268,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "New York Jets", "teamAbbrev": "NYJ", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100283,6 +100290,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Pittsburgh Steelers", "teamAbbrev": "PIT", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100304,6 +100312,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Carolina Panthers", "teamAbbrev": "CAR", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T17:00:00.000Z, }, @@ -100325,6 +100334,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Los Angeles Chargers", "teamAbbrev": "LAC", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:05:00.000Z, }, @@ -100346,6 +100356,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Philadelphia Eagles", "teamAbbrev": "PHI", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -100367,6 +100378,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "San Francisco 49ers", "teamAbbrev": "SF", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -100388,6 +100400,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Seattle Seahawks", "teamAbbrev": "SEA", }, + "odds": [], "quarter": 4, "startTime": 2018-10-07T20:25:00.000Z, }, @@ -100409,6 +100422,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "Houston Texans", "teamAbbrev": "HOU", }, + "odds": [], "quarter": 5, "startTime": 2018-10-08T00:20:00.000Z, }, @@ -100430,6 +100444,7 @@ exports[`2022 season client integration tests getNFLGamesForPeriod returns a pop "team": "New Orleans Saints", "teamAbbrev": "NO", }, + "odds": [], "quarter": 4, "startTime": 2018-10-09T00:15:00.000Z, }, diff --git a/src/client/client.js b/src/client/client.js index 77fa47f..70f8b66 100644 --- a/src/client/client.js +++ b/src/client/client.js @@ -10,7 +10,7 @@ import Team from '../team/team'; import { flattenObjectSansNumericKeys } from '../utils'; -axios.defaults.baseURL = 'https://fantasy.espn.com/apis/v3/games/ffl/seasons/'; +axios.defaults.baseURL = 'https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/'; /** * Provides functionality to make a variety of API calls to ESPN for a given fantasy football @@ -170,7 +170,7 @@ class Client { }); const axiosConfig = this._buildAxiosConfig({ - baseURL: 'https://fantasy.espn.com/apis/v3/games/ffl/leagueHistory/' + baseURL: 'https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/leagueHistory/' }); return axios.get(route, axiosConfig).then((response) => { const schedule = _.get(response.data[0], 'schedule'); // Data is an array instead of object @@ -276,7 +276,7 @@ class Client { }); const axiosConfig = this._buildAxiosConfig({ - baseURL: 'https://fantasy.espn.com/apis/v3/games/ffl/leagueHistory/' + baseURL: 'https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/leagueHistory/' }); return axios.get(route, axiosConfig).then((response) => (