MySportsFeeds / mysportsfeeds-api

Feature requests for the MySportsFeeds Sports Data API.
44 stars 3 forks source link

mlb/2018-regular/cumulative_player_stats.json returns data for player that doesn't exist #79

Closed wujekbogdan closed 6 years ago

wujekbogdan commented 6 years ago

The request:

Endpoint: https://api.mysportsfeeds.com/v1.1/pull/mlb/2018-regular/cumulative_player_stats.json/
playerstats: AB,R,H,2B,3B,HR,RBI,SB,BB,SO,AVG,OBP,SLG,OPS

One of the entries in the response looks as follows:

// ...
{
  "player": {
    "ID": "12539",
    "LastName": "Boyd2",
    "FirstName": "Matt2",
    "JerseyNumber": "48",
    "Position": "P"
  },
  "team": null,
  "stats": {
    "GamesPlayed": {
      "@abbreviation": "G",
      "#text": "0"
    },
    "AtBats": {
      "@category": "Batting",
      "@abbreviation": "AB",
      "#text": "0"
    },
    "Runs": {
      "@category": "Batting",
      "@abbreviation": "R",
      "#text": "0"
    },
    "Hits": {
      "@category": "Batting",
      "@abbreviation": "H",
      "#text": "0"
    },
    "SecondBaseHits": {
      "@category": "Batting",
      "@abbreviation": "2B",
      "#text": "0"
    },
    "ThirdBaseHits": {
      "@category": "Batting",
      "@abbreviation": "3B",
      "#text": "0"
    },
    "Homeruns": {
      "@category": "Batting",
      "@abbreviation": "HR",
      "#text": "0"
    },
    "RunsBattedIn": {
      "@category": "Batting",
      "@abbreviation": "RBI",
      "#text": "0"
    },
    "BatterWalks": {
      "@category": "Batting",
      "@abbreviation": "BB",
      "#text": "0"
    },
    "BatterStrikeouts": {
      "@category": "Batting",
      "@abbreviation": "SO",
      "#text": "0"
    },
    "StolenBases": {
      "@category": "Batting",
      "@abbreviation": "SB",
      "#text": "0"
    },
    "BattingAvg": {
      "@category": "Batting",
      "@abbreviation": "AVG",
      "#text": "0.000"
    },
    "BatterOnBasePct": {
      "@category": "Batting",
      "@abbreviation": "OBP",
      "#text": "0.000"
    },
    "BatterSluggingPct": {
      "@category": "Batting",
      "@abbreviation": "SLG",
      "#text": "0.000"
    },
    "BatterOnBasePlusSluggingPct": {
      "@category": "Batting",
      "@abbreviation": "OPS",
      "#text": "0.000"
    },
    "HitsAllowed": {
      "@category": "Pitching",
      "@abbreviation": "H",
      "#text": "0"
    },
    "SecondBaseHitsAllowed": {
      "@category": "Pitching",
      "@abbreviation": "2B",
      "#text": "0"
    },
    "ThirdBaseHitsAllowed": {
      "@category": "Pitching",
      "@abbreviation": "3B",
      "#text": "0"
    },
    "RunsAllowed": {
      "@category": "Pitching",
      "@abbreviation": "R",
      "#text": "0"
    },
    "HomerunsAllowed": {
      "@category": "Pitching",
      "@abbreviation": "HR",
      "#text": "0"
    },
    "PitcherWalks": {
      "@category": "Pitching",
      "@abbreviation": "BB",
      "#text": "0"
    },
    "PitcherStrikeouts": {
      "@category": "Pitching",
      "@abbreviation": "SO",
      "#text": "0"
    },
    "PitchingAvg": {
      "@category": "Pitching",
      "@abbreviation": "AVG",
      "#text": "0.000"
    },
    "PitcherStolenBasesAllowed": {
      "@category": "Pitching",
      "@abbreviation": "SB",
      "#text": "0"
    },
    "PitcherOnBasePct": {
      "@category": "Pitching",
      "@abbreviation": "OBP",
      "#text": "0.000"
    },
    "PitcherSluggingPct": {
      "@category": "Pitching",
      "@abbreviation": "SLG",
      "#text": "0.000"
    },
    "PitcherOnBasePlusSluggingPct": {
      "@category": "Pitching",
      "@abbreviation": "OPS",
      "#text": "0.000"
    },
    "FielderStolenBasesAllowed": {
      "@category": "Fielding",
      "@abbreviation": "SB",
      "#text": "0"
    }
  }
}

It looks like some testing data that shouldn't be in your database. It causes 2 problems:

bradbarkhouse commented 6 years ago

Thank you @wujekbogdan ! That was definitely a leftover from some other data entry/corrections, so shouldn't have been present at all. He's now been removed!