From 1b63e4ae22349480caf8848931aafda103bf4003 Mon Sep 17 00:00:00 2001 From: Steven C Date: Tue, 3 Oct 2023 23:33:01 -0400 Subject: [PATCH 1/2] Update Team object with improved team name mapping --- src/team/team.js | 5 +---- src/team/team.test.js | 15 --------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/team/team.js b/src/team/team.js index 50ef722..705ceb0 100644 --- a/src/team/team.js +++ b/src/team/team.js @@ -85,10 +85,7 @@ class Team extends BaseCacheableObject { static responseMap = { id: 'id', abbreviation: 'abbrev', - name: { - key: 'location', - manualParse: (responseData, data) => `${_.trim(data.location)} ${_.trim(data.nickname)}` - }, + name: 'name', logoURL: 'logo', wavierRank: 'wavierRank', diff --git a/src/team/team.test.js b/src/team/team.test.js index c1cc359..2316e99 100644 --- a/src/team/team.test.js +++ b/src/team/team.test.js @@ -42,21 +42,6 @@ describe('Team', () => { describe('responseMap', () => { const buildTeam = (data, options) => Team.buildFromServer(data, options); - describe('name', () => { - describe('manualParse', () => { - test('interpolates location and nickname into a single string', () => { - const data = { - location: ' First ', - nickname: ' Last ', - name: 'This is not used' - }; - const team = buildTeam(data); - - expect(team.name).toBe(`${_.trim(data.location)} ${_.trim(data.nickname)}`); - }); - }); - }); - describe('roster', () => { describe('manualParse', () => { test('returns an array of players', () => { From 0196a66715f709b23257c135eab17bf47489efad Mon Sep 17 00:00:00 2001 From: Mike Kreiser Date: Sat, 21 Oct 2023 13:06:50 -0400 Subject: [PATCH 2/2] 1.1.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2bd4ea0..b2017e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "espn-fantasy-football-api", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "espn-fantasy-football-api", - "version": "1.1.0", + "version": "1.1.1", "license": "LGPL-3.0-only", "dependencies": { "axios": "^1.5.0", diff --git a/package.json b/package.json index 47723d6..ffdfa80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espn-fantasy-football-api", - "version": "1.1.0", + "version": "1.1.1", "description": "A Javascript API to connect to ESPN's fantasy football API", "main": "web.js", "files": [