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

Add Detailed Information for game_id Parameter in parameters.md #457

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmortensen
Copy link

This pull request adds detailed information for the game_id parameter in the parameters.md file. The game_id parameter is frequently used throughout the nba_api library, but it previously lacked detailed documentation. The following updates have been made:

Pattern for game_id:

  • Added regex pattern ^\d{10}$ to validate the format of game_id.

Explained the significance of the third digit in the game_id, which functions as a flag indicating the type of season:
1: Preseason game
2: Regular season game
3: All-Star weekend game
4: Playoff game
5: Play-in game

Included examples to illustrate the format and the significance of the third digit:

  • 0022200147: Regular season game
    
  • 0012200147: Preseason game
    

Version:
This update is for version 1.5.0.

Please let me know if there are any additional changes or improvements needed for this documentation update.

Thank you for your time and consideration in reviewing this PR.

@rsforbes
Copy link
Collaborator

@gmortensen - Apologies for not getting to this sooner.

The parameters.md file is auto-generated via generator.py. The generator then looks to mapping.py. If you're able to incorporate your changes there, I think you'll be set to go.

@rsforbes rsforbes self-assigned this Aug 27, 2024
@rsforbes rsforbes self-requested a review August 27, 2024 23:53
@rsforbes rsforbes marked this pull request as draft August 28, 2024 00:34
@sreyemnayr
Copy link
Contributor

Just in case someone else is looking here for this information...

GameID Structure (10 digits)
┌─────────────────────┐
│ XX │ X │ XX │ XXXXX │
└─────────────────────┘
 ▲    ▲    ▲    ▲
 │    │    │    │
 │    │    │    └── Game Number (00001-99999)
 │    │    │
 │    │    └── Season (24 = 2024-25)
 │    │
 │    └── Season Type
 │        1: Pre-Season
 │        2: Regular Season
 │        3: All-Star
 │        4: Playoffs
 │        5: Play-In
 │        6: In-Season Tournament
 │
 └── League ID
     00: National Basketball Association (NBA)
     01: ABA
     10: Women's National Basketball Association (WNBA)
     15: NBA Summer League
     20: NBA G League
     12: NBA 2K League (E-Sports)
     ??: Basketball Africa League (BAL)

Examples:
0022400001 = NBA Regular Season 2024-25 Game #1
1023300123 = WNBA Regular Season 2023 Game #123
0042300405 = NBA Playoffs 2023-24 Final
0062300001 = NBA In-Season Tournament 2023-24 Game #1 (There is only ever one)

@rsforbes
Copy link
Collaborator

@gmortensen - What's the state of your PR? I'd added some comments, but wasn't sure if you'd updated the PR. Regarding the game id structure, perhaps we could put that right into the readme.md of the main page...or link to a sub page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants