ynnadkrap / balldontlie

NBA API
http://www.balldontlie.io
223 stars 19 forks source link

[BUG] I get games result of 1990 bu calling an other specific season #15

Closed bladx closed 5 years ago

bladx commented 5 years ago

Hello,

I just found out that when I call the following URL : https://www.balldontlie.io/api/v1/games?per_page=100&seasons=2018&page=10 in the response I have multiple games from 1990 even if I specified seasons = 2018 in the query parameter. Here is an example I got from the response :

{
id: 627,
date: "1990-11-02T00:00:00.000Z",
home_team: {
id: 5,
abbreviation: "CHI",
city: "Chicago",
conference: "East",
division: "Central",
full_name: "Chicago Bulls",
name: "Bulls"
},
home_team_score: 116,
period: 4,
postseason: false,
season: 1990,
status: "Final",
time: " ",
visitor_team: {
id: 23,
abbreviation: "PHI",
city: "Philadelphia",
conference: "East",
division: "Atlantic",
full_name: "Philadelphia 76ers",
name: "76ers"
},
visitor_team_score: 124
}

BR,

Xavier

ynnadkrap commented 5 years ago

The seasons query param should be an array: https://www.balldontlie.io/api/v1/games?per_page=100&seasons[]=2018&page=10

bladx commented 5 years ago

Hello Danny,

Thank you, I thought there was no difference when targeting a single season. I'll be careful with array query parameters now.

Best,

Xavier