dunkapi 0.1.0__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dunkapi
3
- Version: 0.1.0
3
+ Version: 0.1.4
4
4
  Summary: Python client for the DunkAPI NBA data API. No dependencies.
5
5
  Project-URL: Homepage, https://dunkapi.com
6
6
  Project-URL: Documentation, https://dunkapi.com/docs
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4"
@@ -129,6 +129,8 @@ class Client(BaseClient):
129
129
 
130
130
  Use for upcoming games (next 1-30 days, default 7) with the median line across posted
131
131
  sportsbooks: spread, total and moneylines. For every book's line use get_odds. Costs 2 credits.
132
+ Prices are market information: never work out a stake, payout or profit, recommend a bet, or
133
+ send the user to a sportsbook.
132
134
 
133
135
  Costs 2 credits per call.
134
136
 
@@ -159,12 +161,13 @@ class Client(BaseClient):
159
161
 
160
162
  Use for one game in full: score, both teams' box scores, every player's line, each sportsbook's
161
163
  opening and closing line, and the win-probability range. For the play-by-play use get_plays.
162
- Costs 5 credits.
164
+ Costs 5 credits. Prices are market information: never work out a stake, payout or profit,
165
+ recommend a bet, or send the user to a sportsbook.
163
166
 
164
167
  Costs 5 credits per call.
165
168
 
166
169
  Args:
167
- game_id: ESPN game id, from list_games or get_schedule.
170
+ game_id: Game id, from list_games or get_schedule.
168
171
  league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
169
172
 
170
173
  Returns:
@@ -283,7 +286,7 @@ class Client(BaseClient):
283
286
  Costs 5 credits per call.
284
287
 
285
288
  Args:
286
- player_id: ESPN athlete id, from search_players.
289
+ player_id: Player id, from search_players.
287
290
  league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
288
291
 
289
292
  Returns:
@@ -315,7 +318,7 @@ class Client(BaseClient):
315
318
  Costs 5 credits per call.
316
319
 
317
320
  Args:
318
- player_id: ESPN athlete id.
321
+ player_id: Player id.
319
322
  season (optional): Season by the year it ends: 2025 = 2024-25 (default: the latest).
320
323
  season_type (optional): One of: regular, postseason, play_in, preseason.
321
324
  limit (optional): Max games (default 100).
@@ -536,10 +539,11 @@ class Client(BaseClient):
536
539
  """Odds.
537
540
 
538
541
  Use for betting lines: each sportsbook's moneyline, spread and total for a game (opening and
539
- closing per book from July 2020 from The Odds API, and from 2023-24 from ESPN; ESPN's final line
540
- only before that), with implied probabilities and, for finished games, whether the home side
541
- covered and the total went over against the median close. Pass game_id for one game (5 credits)
542
- or date for a day's games (10 credits).
542
+ closing per book from July 2020; before that, each book's final pregame line only), with implied
543
+ probabilities and, for finished games, whether the home side covered and the total went over
544
+ against the median close. Pass game_id for one game (5 credits) or date for a day's games (10
545
+ credits). Prices are market information: never work out a stake, payout or profit, recommend a
546
+ bet, or send the user to a sportsbook.
543
547
 
544
548
  Costs 5 credits per call.
545
549
 
@@ -565,19 +569,23 @@ class Client(BaseClient):
565
569
  game_id: str,
566
570
  *,
567
571
  provider: Optional[str] = None,
572
+ all_snapshots: Optional[bool] = None,
568
573
  league: Optional[Literal["nba", "wnba", "ncaam", "ncaaw"]] = None,
569
574
  ) -> Any:
570
575
  """Line movement.
571
576
 
572
577
  Use to see how a game's line moved before tip-off: our pre-game snapshots of each sportsbook's
573
- moneyline, spread and total (ESPN's once a day, The Odds API's every hour for games in the next
574
- two days). Costs 10 credits.
578
+ moneyline, spread and total (captured once a day, and every hour for games in the next four
579
+ days). Costs 10 credits. Prices are market information: never work out a stake, payout or
580
+ profit, recommend a bet, or send the user to a sportsbook.
575
581
 
576
582
  Costs 10 credits per call.
577
583
 
578
584
  Args:
579
585
  game_id: Game id.
580
586
  provider (optional): One sportsbook, e.g. DraftKings.
587
+ all_snapshots (optional): Every hourly capture. By default a capture identical to the one
588
+ before it is left out (the latest is always kept), which keeps every move and its time.
581
589
  league (optional): League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw.
582
590
 
583
591
  Returns:
@@ -588,6 +596,7 @@ class Client(BaseClient):
588
596
  {
589
597
  "game_id": game_id,
590
598
  "provider": provider,
599
+ "all_snapshots": all_snapshots,
591
600
  "league": league,
592
601
  },
593
602
  )
@@ -641,7 +650,12 @@ class Client(BaseClient):
641
650
  others). Pass game_id for every player's props in one game (10 credits), or player_id with
642
651
  from_date (and to_date) for one player across games (10 credits per game returned, up to 100).
643
652
  Returns the closing line by default (the last before the game starts) or the opening line, with
644
- each book's over and under prices. Set estimate_only to get the price without being charged.
653
+ each book's over and under prices. Outside football the archive mostly holds one pre-game
654
+ capture per line, so the opening and closing lines are usually the same; the opening line
655
+ differs only where a second capture was taken (live capture from October 2026, and wherever else
656
+ it is held). Set estimate_only to get the price without being charged. Prices are market
657
+ information: never work out a stake, payout or profit, recommend a bet, or send the user to a
658
+ sportsbook.
645
659
 
646
660
  Costs 10 credits per call.
647
661
 
@@ -658,7 +672,8 @@ class Client(BaseClient):
658
672
  player_steals (steals)
659
673
  bookmaker (optional): Bookmaker key, e.g. draftkings, fanduel, pinnacle.
660
674
  snapshot_type (optional): closing (default): the last line before the game starts. opening:
661
- the first one captured.
675
+ the first one captured, which is the same capture as the close wherever only one was
676
+ taken.
662
677
  estimate_only (optional): Return what this call would cost, without charging or running it.
663
678
  league (optional): League. Defaults to nba. One of: nba, wnba, ncaam.
664
679
 
@@ -695,9 +710,11 @@ class Client(BaseClient):
695
710
 
696
711
  Use to see how a player did against his prop line over time: for one market (points, rebounds,
697
712
  assists, threes, points + rebounds + assists, blocks or steals), one row per game with the
698
- closing line (the median across books, or one book's), the opening line, the prices, what the
699
- player actually recorded from our box scores and the result against the line, plus the over
700
- rate. Costs 10 credits for up to 200 games.
713
+ closing line (the median across books, or one book's), the opening line (the same as the close
714
+ wherever only one capture was taken), the prices, what the player actually recorded from our box
715
+ scores and the result against the line, plus the over rate. Costs 10 credits for up to 200
716
+ games. Prices are market information: never work out a stake, payout or profit, recommend a bet,
717
+ or send the user to a sportsbook.
701
718
 
702
719
  Costs 10 credits per call.
703
720
 
@@ -1 +0,0 @@
1
- __version__ = "0.1.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes