Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: BoxScoreMiscV3 and related classes and Start_Period and End_Period #436

Open
rupink opened this issue Apr 5, 2024 · 1 comment
Open
Labels
bug Something isn't working triage Researching into a possible bug

Comments

@rupink
Copy link

rupink commented Apr 5, 2024

NBA API Version

V1.4.7

Issue

The StartPeriod and EndPeriod parameters (which just return a string that contains the numbers 1-4) are being used with the boxscoremiscv3 and related classes. However, these calls do not return information based on the quarters, regardless of what information you place into the parameters. The provided code is an example where the call does not return the specified data between the second and third quarter of the game_id = '0021701171'. I wonder if I am implementing this wrong. Or if this is truly is a bug. I am running the script locally.

Code

from nba_api.stats.endpoints import boxscoremiscv3
from nba_api.stats.library.parameters import Period, StartPeriod, EndPeriod
box_scores = boxscoremiscv3.BoxScoreMiscV3(game_id = '0021701171' , start_period = StartPeriod.second, end_period = EndPeriod.third)

@rupink rupink added bug Something isn't working triage Researching into a possible bug labels Apr 5, 2024
@shufinskiy
Copy link
Contributor

@rupink if you want to get data about a quarter, in addition to specifying restrictions in the start_period and end_period parameters, the range_type parameter must be equal to 1. Otherwise, regardless of the start_period and end_period parameters, endpoint will return information about full game.

from nba_api.stats.endpoints import boxscoremiscv3
from nba_api.stats.library.parameters import Period, StartPeriod, EndPeriod
box_scores = boxscoremiscv3.BoxScoreMiscV3(game_id = '0021701171', start_period = StartPeriod.second, end_period = EndPeriod.third, range_type=1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Researching into a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants