@databallr/sdk 0.1.0 → 0.2.0
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.
- package/README.md +2 -3
- package/dist/generated/methods.d.ts +1 -7
- package/dist/generated/methods.js +1 -4
- package/dist/generated/schema.d.ts +0 -192
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,11 +4,10 @@ TypeScript client for the [databallr API](https://api.databallr.com/docs):
|
|
|
4
4
|
NBA and WNBA stats, player and team data, WOWY, shot quality, and SixRings.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
npm install @databallr/sdk
|
|
7
|
+
npm install @databallr/sdk
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Releases are 0.x
|
|
11
|
-
version may break.
|
|
10
|
+
Releases are 0.x while method names settle, so a minor version may break.
|
|
12
11
|
|
|
13
12
|
```ts
|
|
14
13
|
import { Databallr } from "@databallr/sdk";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** First 12 hex characters of the SHA-256 of the key-callable spec these files came from. */
|
|
2
|
-
export declare const SPEC_HASH = "
|
|
2
|
+
export declare const SPEC_HASH = "b4631e327a47";
|
|
3
3
|
/**
|
|
4
4
|
* Every generated method: GET operations by path, POST queries as
|
|
5
5
|
* `POST <path>`. `Databallr` turns this table into `dbr.nba.players.search(...)`.
|
|
@@ -185,10 +185,6 @@ export declare const methods: {
|
|
|
185
185
|
readonly get: "/v1/nba/shots";
|
|
186
186
|
/** List the shot-map filter seasons and teams. `GET /v1/nba/shots/filters` · `stats:read` */
|
|
187
187
|
readonly filters: "/v1/nba/shots/filters";
|
|
188
|
-
/** Get a shot video link by shot id. `GET /v1/nba/shots/video-link-by-shot-id/{shot_id}` · `stats:read` */
|
|
189
|
-
readonly videoLinkByShotId: "/v1/nba/shots/video-link-by-shot-id/{shot_id}";
|
|
190
|
-
/** Get a shot video link by game and action number. `GET /v1/nba/shots/video-link/{game_id}/{action_number}` · `stats:read` */
|
|
191
|
-
readonly videoLinkByGameIdByActionNumber: "/v1/nba/shots/video-link/{game_id}/{action_number}";
|
|
192
188
|
};
|
|
193
189
|
readonly standings: {
|
|
194
190
|
/** List NBA standings. `GET /v1/nba/standings` · `stats:read` */
|
|
@@ -263,8 +259,6 @@ export declare const methods: {
|
|
|
263
259
|
readonly playsByEventId: "/v1/wnba/live/plays/{event_id}";
|
|
264
260
|
};
|
|
265
261
|
readonly players: {
|
|
266
|
-
/** Get a WNBA player headshot. `GET /v1/wnba/players/image/{entity_id}` · `stats:read` */
|
|
267
|
-
readonly imageByEntityId: "/v1/wnba/players/image/{entity_id}";
|
|
268
262
|
/** List WNBA player stats. `GET /v1/wnba/players/stats` · `stats:read` */
|
|
269
263
|
readonly stats: "/v1/wnba/players/stats";
|
|
270
264
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SPEC_HASH = "
|
|
1
|
+
export const SPEC_HASH = "b4631e327a47";
|
|
2
2
|
export const methods = {
|
|
3
3
|
apps: {
|
|
4
4
|
sixrings: {
|
|
@@ -109,8 +109,6 @@ export const methods = {
|
|
|
109
109
|
shots: {
|
|
110
110
|
get: "/v1/nba/shots",
|
|
111
111
|
filters: "/v1/nba/shots/filters",
|
|
112
|
-
videoLinkByShotId: "/v1/nba/shots/video-link-by-shot-id/{shot_id}",
|
|
113
|
-
videoLinkByGameIdByActionNumber: "/v1/nba/shots/video-link/{game_id}/{action_number}",
|
|
114
112
|
},
|
|
115
113
|
standings: {
|
|
116
114
|
get: "/v1/nba/standings",
|
|
@@ -156,7 +154,6 @@ export const methods = {
|
|
|
156
154
|
playsByEventId: "/v1/wnba/live/plays/{event_id}",
|
|
157
155
|
},
|
|
158
156
|
players: {
|
|
159
|
-
imageByEntityId: "/v1/wnba/players/image/{entity_id}",
|
|
160
157
|
stats: "/v1/wnba/players/stats",
|
|
161
158
|
},
|
|
162
159
|
playoffs: {
|
|
@@ -1419,46 +1419,6 @@ export interface paths {
|
|
|
1419
1419
|
patch?: never;
|
|
1420
1420
|
trace?: never;
|
|
1421
1421
|
};
|
|
1422
|
-
"/v1/nba/shots/video-link-by-shot-id/{shot_id}": {
|
|
1423
|
-
parameters: {
|
|
1424
|
-
query?: never;
|
|
1425
|
-
header?: never;
|
|
1426
|
-
path?: never;
|
|
1427
|
-
cookie?: never;
|
|
1428
|
-
};
|
|
1429
|
-
/**
|
|
1430
|
-
* Get a shot video link by shot id
|
|
1431
|
-
* @description **API key scope:** `stats:read`.
|
|
1432
|
-
*/
|
|
1433
|
-
get: operations["getNbaShotsVideoLinkByShotIdByShotId"];
|
|
1434
|
-
put?: never;
|
|
1435
|
-
post?: never;
|
|
1436
|
-
delete?: never;
|
|
1437
|
-
options?: never;
|
|
1438
|
-
head?: never;
|
|
1439
|
-
patch?: never;
|
|
1440
|
-
trace?: never;
|
|
1441
|
-
};
|
|
1442
|
-
"/v1/nba/shots/video-link/{game_id}/{action_number}": {
|
|
1443
|
-
parameters: {
|
|
1444
|
-
query?: never;
|
|
1445
|
-
header?: never;
|
|
1446
|
-
path?: never;
|
|
1447
|
-
cookie?: never;
|
|
1448
|
-
};
|
|
1449
|
-
/**
|
|
1450
|
-
* Get a shot video link by game and action number
|
|
1451
|
-
* @description **API key scope:** `stats:read`.
|
|
1452
|
-
*/
|
|
1453
|
-
get: operations["getNbaShotsVideoLinkByGameIdByActionNumber"];
|
|
1454
|
-
put?: never;
|
|
1455
|
-
post?: never;
|
|
1456
|
-
delete?: never;
|
|
1457
|
-
options?: never;
|
|
1458
|
-
head?: never;
|
|
1459
|
-
patch?: never;
|
|
1460
|
-
trace?: never;
|
|
1461
|
-
};
|
|
1462
1422
|
"/v1/nba/standings": {
|
|
1463
1423
|
parameters: {
|
|
1464
1424
|
query?: never;
|
|
@@ -2039,26 +1999,6 @@ export interface paths {
|
|
|
2039
1999
|
patch?: never;
|
|
2040
2000
|
trace?: never;
|
|
2041
2001
|
};
|
|
2042
|
-
"/v1/wnba/players/image/{entity_id}": {
|
|
2043
|
-
parameters: {
|
|
2044
|
-
query?: never;
|
|
2045
|
-
header?: never;
|
|
2046
|
-
path?: never;
|
|
2047
|
-
cookie?: never;
|
|
2048
|
-
};
|
|
2049
|
-
/**
|
|
2050
|
-
* Get a WNBA player headshot
|
|
2051
|
-
* @description **API key scope:** `stats:read`.
|
|
2052
|
-
*/
|
|
2053
|
-
get: operations["getWnbaPlayersImageByEntityId"];
|
|
2054
|
-
put?: never;
|
|
2055
|
-
post?: never;
|
|
2056
|
-
delete?: never;
|
|
2057
|
-
options?: never;
|
|
2058
|
-
head?: never;
|
|
2059
|
-
patch?: never;
|
|
2060
|
-
trace?: never;
|
|
2061
|
-
};
|
|
2062
2002
|
"/v1/wnba/players/stats": {
|
|
2063
2003
|
parameters: {
|
|
2064
2004
|
query?: never;
|
|
@@ -2440,7 +2380,6 @@ export interface components {
|
|
|
2440
2380
|
espn_abbreviation: string | null;
|
|
2441
2381
|
full_name: string;
|
|
2442
2382
|
id: number;
|
|
2443
|
-
logo: string | null;
|
|
2444
2383
|
name: string;
|
|
2445
2384
|
};
|
|
2446
2385
|
FactShotRow: {
|
|
@@ -3804,7 +3743,6 @@ export interface components {
|
|
|
3804
3743
|
};
|
|
3805
3744
|
WnbaAthleteProfile: {
|
|
3806
3745
|
display_name: string;
|
|
3807
|
-
headshot: string;
|
|
3808
3746
|
id: string;
|
|
3809
3747
|
jersey: string;
|
|
3810
3748
|
position: string;
|
|
@@ -6632,96 +6570,6 @@ export interface operations {
|
|
|
6632
6570
|
};
|
|
6633
6571
|
};
|
|
6634
6572
|
};
|
|
6635
|
-
getNbaShotsVideoLinkByShotIdByShotId: {
|
|
6636
|
-
parameters: {
|
|
6637
|
-
query?: never;
|
|
6638
|
-
header?: never;
|
|
6639
|
-
path: {
|
|
6640
|
-
shot_id: number;
|
|
6641
|
-
};
|
|
6642
|
-
cookie?: never;
|
|
6643
|
-
};
|
|
6644
|
-
requestBody?: never;
|
|
6645
|
-
responses: {
|
|
6646
|
-
/** @description Success. */
|
|
6647
|
-
200: {
|
|
6648
|
-
headers: {
|
|
6649
|
-
[name: string]: unknown;
|
|
6650
|
-
};
|
|
6651
|
-
content: {
|
|
6652
|
-
"text/plain": string;
|
|
6653
|
-
};
|
|
6654
|
-
};
|
|
6655
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
6656
|
-
404: {
|
|
6657
|
-
headers: {
|
|
6658
|
-
[name: string]: unknown;
|
|
6659
|
-
};
|
|
6660
|
-
content: {
|
|
6661
|
-
"application/json": components["schemas"]["ApiError"];
|
|
6662
|
-
};
|
|
6663
|
-
};
|
|
6664
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
6665
|
-
500: {
|
|
6666
|
-
headers: {
|
|
6667
|
-
[name: string]: unknown;
|
|
6668
|
-
};
|
|
6669
|
-
content: {
|
|
6670
|
-
"application/json": components["schemas"]["ApiError"];
|
|
6671
|
-
};
|
|
6672
|
-
};
|
|
6673
|
-
};
|
|
6674
|
-
};
|
|
6675
|
-
getNbaShotsVideoLinkByGameIdByActionNumber: {
|
|
6676
|
-
parameters: {
|
|
6677
|
-
query?: never;
|
|
6678
|
-
header?: never;
|
|
6679
|
-
path: {
|
|
6680
|
-
game_id: number;
|
|
6681
|
-
action_number: number;
|
|
6682
|
-
};
|
|
6683
|
-
cookie?: never;
|
|
6684
|
-
};
|
|
6685
|
-
requestBody?: never;
|
|
6686
|
-
responses: {
|
|
6687
|
-
/** @description Success. */
|
|
6688
|
-
200: {
|
|
6689
|
-
headers: {
|
|
6690
|
-
[name: string]: unknown;
|
|
6691
|
-
};
|
|
6692
|
-
content: {
|
|
6693
|
-
"text/plain": string;
|
|
6694
|
-
};
|
|
6695
|
-
};
|
|
6696
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
6697
|
-
400: {
|
|
6698
|
-
headers: {
|
|
6699
|
-
[name: string]: unknown;
|
|
6700
|
-
};
|
|
6701
|
-
content: {
|
|
6702
|
-
"application/json": components["schemas"]["ApiError"];
|
|
6703
|
-
};
|
|
6704
|
-
};
|
|
6705
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
6706
|
-
404: {
|
|
6707
|
-
headers: {
|
|
6708
|
-
[name: string]: unknown;
|
|
6709
|
-
};
|
|
6710
|
-
content: {
|
|
6711
|
-
"application/json": components["schemas"]["ApiError"];
|
|
6712
|
-
};
|
|
6713
|
-
};
|
|
6714
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
6715
|
-
500: {
|
|
6716
|
-
headers: {
|
|
6717
|
-
[name: string]: unknown;
|
|
6718
|
-
};
|
|
6719
|
-
content: {
|
|
6720
|
-
"application/json": components["schemas"]["ApiError"];
|
|
6721
|
-
};
|
|
6722
|
-
};
|
|
6723
|
-
};
|
|
6724
|
-
};
|
|
6725
6573
|
getNbaStandings: {
|
|
6726
6574
|
parameters: {
|
|
6727
6575
|
query?: {
|
|
@@ -7909,46 +7757,6 @@ export interface operations {
|
|
|
7909
7757
|
};
|
|
7910
7758
|
};
|
|
7911
7759
|
};
|
|
7912
|
-
getWnbaPlayersImageByEntityId: {
|
|
7913
|
-
parameters: {
|
|
7914
|
-
query?: never;
|
|
7915
|
-
header?: never;
|
|
7916
|
-
path: {
|
|
7917
|
-
entity_id: string;
|
|
7918
|
-
};
|
|
7919
|
-
cookie?: never;
|
|
7920
|
-
};
|
|
7921
|
-
requestBody?: never;
|
|
7922
|
-
responses: {
|
|
7923
|
-
/** @description Success. */
|
|
7924
|
-
200: {
|
|
7925
|
-
headers: {
|
|
7926
|
-
[name: string]: unknown;
|
|
7927
|
-
};
|
|
7928
|
-
content: {
|
|
7929
|
-
"image/*": string;
|
|
7930
|
-
};
|
|
7931
|
-
};
|
|
7932
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
7933
|
-
400: {
|
|
7934
|
-
headers: {
|
|
7935
|
-
[name: string]: unknown;
|
|
7936
|
-
};
|
|
7937
|
-
content: {
|
|
7938
|
-
"application/json": components["schemas"]["ApiError"];
|
|
7939
|
-
};
|
|
7940
|
-
};
|
|
7941
|
-
/** @description Error. Shape is the shared envelope when the handler uses it; not every route does. */
|
|
7942
|
-
404: {
|
|
7943
|
-
headers: {
|
|
7944
|
-
[name: string]: unknown;
|
|
7945
|
-
};
|
|
7946
|
-
content: {
|
|
7947
|
-
"application/json": components["schemas"]["ApiError"];
|
|
7948
|
-
};
|
|
7949
|
-
};
|
|
7950
|
-
};
|
|
7951
|
-
};
|
|
7952
7760
|
getWnbaPlayersStats: {
|
|
7953
7761
|
parameters: {
|
|
7954
7762
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databallr/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "TypeScript client for the databallr API (NBA and WNBA stats, SixRings)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"node": ">=20"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
37
|
-
"tag": "next"
|
|
36
|
+
"access": "public"
|
|
38
37
|
},
|
|
39
38
|
"scripts": {
|
|
40
39
|
"generate": "node scripts/generate.mjs",
|
|
41
40
|
"generate:check": "node scripts/generate.mjs --check",
|
|
42
41
|
"check:public-surface": "node scripts/check-public-surface.mjs",
|
|
43
42
|
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsc -p tsconfig.types.json",
|
|
43
|
+
"smoke": "node scripts/smoke.mjs",
|
|
44
44
|
"check:package": "publint && attw --pack . --profile esm-only && node scripts/check-size.mjs",
|
|
45
45
|
"test": "pnpm generate:check && pnpm check:public-surface && vitest run && pnpm build && pnpm check:package",
|
|
46
46
|
"typecheck": "tsc --noEmit"
|