benjovi09 / basketball-stats

Simple React app that retrieves NBA stats with the balldontlie API.
https://basketball-stats-6b210.web.app/
0 stars 1 forks source link

Incomplete Stats #3

Open benjovi09 opened 4 years ago

benjovi09 commented 4 years ago

There are more stats offered by the API that aren't being averaged and displayed.

benjovi09 commented 4 years ago

Here's an example request to get Stats from the API:

https://www.balldontlie.io/api/v1/stats?player_ids[]=569

{
            "id": 981332,
            "ast": 0,
            "blk": 0,
            "dreb": 3,
            "fg3_pct": 0.0,
            "fg3a": 0,
            "fg3m": 0,
            "fg_pct": 1.0,
            "fga": 1,
            "fgm": 1,
            "ft_pct": 0.5,
            "fta": 4,
            "ftm": 2,
            "game": {
                "id": 42504,
                "date": "1986-11-07T00:00:00.000Z",
                "home_team_id": 9,
                "home_team_score": 115,
                "period": 4,
                "postseason": false,
                "season": 1986,
                "status": "Final",
                "time": " ",
                "visitor_team_id": 5,
                "visitor_team_score": 109
            },
            "min": "12",
            "oreb": 2,
            "pf": 4,
            "player": {
                "id": 569,
                "first_name": "Mike",
                "height_feet": null,
                "height_inches": null,
                "last_name": "Brown",
                "position": "",
                "team_id": 29,
                "weight_pounds": null
            },
            "pts": 4,
            "reb": 5,
            "stl": 0,
            "team": {
                "id": 5,
                "abbreviation": "CHI",
                "city": "Chicago",
                "conference": "East",
                "division": "Central",
                "full_name": "Chicago Bulls",
                "name": "Bulls"
            },
            "turnover": 1
        }

Right now, only the ast, pts, and blk properties are being averaged and displayed.