propline 0.55.0 → 0.56.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 +21 -0
- package/dist/index.cjs +30 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -765,6 +765,21 @@ interface ResultsResponse {
|
|
|
765
765
|
upgrade_url?: string;
|
|
766
766
|
[k: string]: unknown;
|
|
767
767
|
}
|
|
768
|
+
/** One match from {@link PropLine.searchPlayers}. */
|
|
769
|
+
interface PlayerSearchResult {
|
|
770
|
+
/** Stable id, usable in place of a name on history/trends (e.g. `"mlb:677951"`). */
|
|
771
|
+
player_id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
/** Every spelling the books use for this player. */
|
|
774
|
+
known_names: string[];
|
|
775
|
+
[k: string]: unknown;
|
|
776
|
+
}
|
|
777
|
+
interface PlayerSearchResponse {
|
|
778
|
+
sport_key: string;
|
|
779
|
+
search: string;
|
|
780
|
+
players: PlayerSearchResult[];
|
|
781
|
+
[k: string]: unknown;
|
|
782
|
+
}
|
|
768
783
|
interface PlayerHistoryEntry {
|
|
769
784
|
event_id: number | string;
|
|
770
785
|
commence_time: string;
|
|
@@ -779,11 +794,17 @@ interface PlayerHistoryEntry {
|
|
|
779
794
|
over_result: "won" | "lost" | "push" | "void" | null;
|
|
780
795
|
under_result: "won" | "lost" | "push" | "void" | null;
|
|
781
796
|
resolved_at: string | null;
|
|
797
|
+
/** True when this line is the book's main line (not an alt-ladder rung). */
|
|
798
|
+
is_main_line?: boolean;
|
|
799
|
+
/** True when the book moved this line after the game started. */
|
|
800
|
+
line_moved_in_play?: boolean;
|
|
782
801
|
redacted?: boolean;
|
|
783
802
|
[k: string]: unknown;
|
|
784
803
|
}
|
|
785
804
|
interface PlayerHistoryResponse {
|
|
786
805
|
player_name: string;
|
|
806
|
+
/** Stable player id (e.g. `"mlb:677951"`), or `null` when unknown. */
|
|
807
|
+
player_id?: string | null;
|
|
787
808
|
sport_key: string;
|
|
788
809
|
market: string;
|
|
789
810
|
entries: PlayerHistoryEntry[];
|
|
@@ -834,6 +855,8 @@ interface PlayerMarketTrend {
|
|
|
834
855
|
}
|
|
835
856
|
interface PlayerTrends {
|
|
836
857
|
player_name: string;
|
|
858
|
+
/** Stable player id (e.g. `"mlb:592450"`), or `null` when unknown. */
|
|
859
|
+
player_id?: string | null;
|
|
837
860
|
sport_key: string;
|
|
838
861
|
/**
|
|
839
862
|
* Echo of the `dfs_odds_type` filter that scoped these trends (PrizePicks
|
|
@@ -1574,6 +1597,12 @@ interface GetPlayerHistoryOptions {
|
|
|
1574
1597
|
bookmaker?: string;
|
|
1575
1598
|
/** Max entries (1-100). Default 20. */
|
|
1576
1599
|
limit?: number;
|
|
1600
|
+
/** Only each book's main line (drops alt-ladder rungs). */
|
|
1601
|
+
mainLineOnly?: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
interface SearchPlayersOptions {
|
|
1604
|
+
/** Max players (1-100). Server default 25. */
|
|
1605
|
+
limit?: number;
|
|
1577
1606
|
}
|
|
1578
1607
|
interface GetPlayerGamesOptions {
|
|
1579
1608
|
/** Games to return, 1-100. Default 20. */
|
|
@@ -1993,10 +2022,24 @@ declare class PropLine {
|
|
|
1993
2022
|
* Pro tier: full data. Free tier: redacted (resolution + actual nulled).
|
|
1994
2023
|
*/
|
|
1995
2024
|
getResults(sport: string, eventId: number | string, options?: GetResultsOptions): Promise<ResultsResponse>;
|
|
2025
|
+
/**
|
|
2026
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
2027
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
2028
|
+
* or {@link getPlayerTrends}.
|
|
2029
|
+
*
|
|
2030
|
+
* @example
|
|
2031
|
+
* ```ts
|
|
2032
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
2033
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
2034
|
+
* ```
|
|
2035
|
+
*/
|
|
2036
|
+
searchPlayers(sport: string, search: string, options?: SearchPlayersOptions): Promise<PlayerSearchResponse>;
|
|
1996
2037
|
/**
|
|
1997
2038
|
* Recent resolved prop history for a player on a market.
|
|
1998
2039
|
*
|
|
1999
2040
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
2041
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
2042
|
+
* (see {@link searchPlayers}).
|
|
2000
2043
|
*/
|
|
2001
2044
|
getPlayerHistory(sport: string, playerName: string, options: GetPlayerHistoryOptions): Promise<PlayerHistoryResponse>;
|
|
2002
2045
|
/**
|
|
@@ -2029,7 +2072,8 @@ declare class PropLine {
|
|
|
2029
2072
|
*
|
|
2030
2073
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
2031
2074
|
* the current streak, and the most recent game per market. Pro: full.
|
|
2032
|
-
* Free: redacted.
|
|
2075
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
2076
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
2033
2077
|
*/
|
|
2034
2078
|
getPlayerTrends(sportKey: string, playerName: string, options?: GetPlayerTrendsOptions): Promise<PlayerTrends>;
|
|
2035
2079
|
/**
|
|
@@ -2417,6 +2461,6 @@ declare const Bookmakers: {
|
|
|
2417
2461
|
readonly PRIZEPICKS: "prizepicks";
|
|
2418
2462
|
};
|
|
2419
2463
|
type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
|
|
2420
|
-
declare const VERSION = "0.
|
|
2464
|
+
declare const VERSION = "0.56.0";
|
|
2421
2465
|
|
|
2422
|
-
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
|
2466
|
+
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerSearchResponse, type PlayerSearchResult, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SearchPlayersOptions, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
package/dist/index.d.ts
CHANGED
|
@@ -765,6 +765,21 @@ interface ResultsResponse {
|
|
|
765
765
|
upgrade_url?: string;
|
|
766
766
|
[k: string]: unknown;
|
|
767
767
|
}
|
|
768
|
+
/** One match from {@link PropLine.searchPlayers}. */
|
|
769
|
+
interface PlayerSearchResult {
|
|
770
|
+
/** Stable id, usable in place of a name on history/trends (e.g. `"mlb:677951"`). */
|
|
771
|
+
player_id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
/** Every spelling the books use for this player. */
|
|
774
|
+
known_names: string[];
|
|
775
|
+
[k: string]: unknown;
|
|
776
|
+
}
|
|
777
|
+
interface PlayerSearchResponse {
|
|
778
|
+
sport_key: string;
|
|
779
|
+
search: string;
|
|
780
|
+
players: PlayerSearchResult[];
|
|
781
|
+
[k: string]: unknown;
|
|
782
|
+
}
|
|
768
783
|
interface PlayerHistoryEntry {
|
|
769
784
|
event_id: number | string;
|
|
770
785
|
commence_time: string;
|
|
@@ -779,11 +794,17 @@ interface PlayerHistoryEntry {
|
|
|
779
794
|
over_result: "won" | "lost" | "push" | "void" | null;
|
|
780
795
|
under_result: "won" | "lost" | "push" | "void" | null;
|
|
781
796
|
resolved_at: string | null;
|
|
797
|
+
/** True when this line is the book's main line (not an alt-ladder rung). */
|
|
798
|
+
is_main_line?: boolean;
|
|
799
|
+
/** True when the book moved this line after the game started. */
|
|
800
|
+
line_moved_in_play?: boolean;
|
|
782
801
|
redacted?: boolean;
|
|
783
802
|
[k: string]: unknown;
|
|
784
803
|
}
|
|
785
804
|
interface PlayerHistoryResponse {
|
|
786
805
|
player_name: string;
|
|
806
|
+
/** Stable player id (e.g. `"mlb:677951"`), or `null` when unknown. */
|
|
807
|
+
player_id?: string | null;
|
|
787
808
|
sport_key: string;
|
|
788
809
|
market: string;
|
|
789
810
|
entries: PlayerHistoryEntry[];
|
|
@@ -834,6 +855,8 @@ interface PlayerMarketTrend {
|
|
|
834
855
|
}
|
|
835
856
|
interface PlayerTrends {
|
|
836
857
|
player_name: string;
|
|
858
|
+
/** Stable player id (e.g. `"mlb:592450"`), or `null` when unknown. */
|
|
859
|
+
player_id?: string | null;
|
|
837
860
|
sport_key: string;
|
|
838
861
|
/**
|
|
839
862
|
* Echo of the `dfs_odds_type` filter that scoped these trends (PrizePicks
|
|
@@ -1574,6 +1597,12 @@ interface GetPlayerHistoryOptions {
|
|
|
1574
1597
|
bookmaker?: string;
|
|
1575
1598
|
/** Max entries (1-100). Default 20. */
|
|
1576
1599
|
limit?: number;
|
|
1600
|
+
/** Only each book's main line (drops alt-ladder rungs). */
|
|
1601
|
+
mainLineOnly?: boolean;
|
|
1602
|
+
}
|
|
1603
|
+
interface SearchPlayersOptions {
|
|
1604
|
+
/** Max players (1-100). Server default 25. */
|
|
1605
|
+
limit?: number;
|
|
1577
1606
|
}
|
|
1578
1607
|
interface GetPlayerGamesOptions {
|
|
1579
1608
|
/** Games to return, 1-100. Default 20. */
|
|
@@ -1993,10 +2022,24 @@ declare class PropLine {
|
|
|
1993
2022
|
* Pro tier: full data. Free tier: redacted (resolution + actual nulled).
|
|
1994
2023
|
*/
|
|
1995
2024
|
getResults(sport: string, eventId: number | string, options?: GetResultsOptions): Promise<ResultsResponse>;
|
|
2025
|
+
/**
|
|
2026
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
2027
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
2028
|
+
* or {@link getPlayerTrends}.
|
|
2029
|
+
*
|
|
2030
|
+
* @example
|
|
2031
|
+
* ```ts
|
|
2032
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
2033
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
2034
|
+
* ```
|
|
2035
|
+
*/
|
|
2036
|
+
searchPlayers(sport: string, search: string, options?: SearchPlayersOptions): Promise<PlayerSearchResponse>;
|
|
1996
2037
|
/**
|
|
1997
2038
|
* Recent resolved prop history for a player on a market.
|
|
1998
2039
|
*
|
|
1999
2040
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
2041
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
2042
|
+
* (see {@link searchPlayers}).
|
|
2000
2043
|
*/
|
|
2001
2044
|
getPlayerHistory(sport: string, playerName: string, options: GetPlayerHistoryOptions): Promise<PlayerHistoryResponse>;
|
|
2002
2045
|
/**
|
|
@@ -2029,7 +2072,8 @@ declare class PropLine {
|
|
|
2029
2072
|
*
|
|
2030
2073
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
2031
2074
|
* the current streak, and the most recent game per market. Pro: full.
|
|
2032
|
-
* Free: redacted.
|
|
2075
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
2076
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
2033
2077
|
*/
|
|
2034
2078
|
getPlayerTrends(sportKey: string, playerName: string, options?: GetPlayerTrendsOptions): Promise<PlayerTrends>;
|
|
2035
2079
|
/**
|
|
@@ -2417,6 +2461,6 @@ declare const Bookmakers: {
|
|
|
2417
2461
|
readonly PRIZEPICKS: "prizepicks";
|
|
2418
2462
|
};
|
|
2419
2463
|
type BookmakerKey = (typeof Bookmakers)[keyof typeof Bookmakers];
|
|
2420
|
-
declare const VERSION = "0.
|
|
2464
|
+
declare const VERSION = "0.56.0";
|
|
2421
2465
|
|
|
2422
|
-
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
|
2466
|
+
export { AuthError, type BestLine, type BestLineSide, type BestPrice, type Bookmaker, type BookmakerKey, Bookmakers, type CalcEventEvOptions, type ClosingBookmaker, type ClosingMarket, type ClosingOutcome, type ClvBetInput, type ClvGradeResponse, type ClvGradedBet, type ClvSummary, type ContextResponse, type CreateWebhookOptions, type DepthLevel, type DfsPayoutTier, type DfsPayoutsResponse, type DfsPlayPayout, type EvLine, type EvOutcome, type Event, type EventBestLineResponse, type EventEvCalcResponse, type EventEvResponse, type EventProjectionsResponse, type ExportOddsHistoryOptions, type ExportResolvedPropsOptions, type FuturesEvent, type FuturesMarket, type FuturesOutcome, type GetDfsPayoutsOptions, type GetEventBestLineOptions, type GetEventEvOptions, type GetEventProjectionsOptions, type GetMlbGrandSalamiOptions, type GetMovementOptions, type GetNhlDailyGoalsTotalOptions, type GetOddsClosingOptions, type GetOddsHistoryOptions, type GetOddsOptions, type GetPlayerGamesOptions, type GetPlayerHistoryOptions, type GetPlayerTrendsOptions, type GetResultsOptions, type GetScoresOptions, type GetStatsOptions, type HitRateSplit, type LineMovementPrice, type LineMovementWebhookPayload, type ListWebhookDeliveriesOptions, type Market, type MarketSummary, type MlbGrandSalamiBook, type MlbGrandSalamiResponse, type MovementBookmaker, type MovementMarket, type MovementOutcome, type MovementResponse, type NhlDailyGoalsTotalBook, type NhlDailyGoalsTotalResponse, type OddsClosingResponse, type OddsHistoryBookmaker, type OddsHistoryMarket, type OddsHistoryOutcome, type OddsHistoryResponse, type OddsResponse, type Outcome, type OutcomeSnapshot, type PeriodFilter, type PlayerGame, type PlayerGameLog, type PlayerHistoryEntry, type PlayerHistoryResponse, type PlayerMarketTrend, type PlayerSearchResponse, type PlayerSearchResult, type PlayerStat, type PlayerTrends, type ProjectionRow, PropLine, PropLineError, type PropLineErrorInfo, type PropLineOptions, type QuotaStatus, RateLimitError, type ReplayEvent, type ReplayPage, type ReplayWebhookEventsOptions, type ResolutionSummary, type ResolutionSummaryMarket, type ResolutionSummarySport, type ResolvedOutcome, type ResultsMarket, type ResultsResponse, type ScoreEvent, type SearchPlayersOptions, type SgpBookError, type SgpLegInput, type SgpLegQuote, type SgpMultiQuoteResponse, type SgpQuoteResponse, type Sport, type StatsResponse, type SteamMove, type SteamWebhookPayload, type StreamOptions, type TrendLastGame, type TrendStreak, type UpdateWebhookOptions, VERSION, type VerifySignatureOptions, type WeatherInfo, type Webhook, type WebhookDelivery, type WebhookEventType };
|
package/dist/index.js
CHANGED
|
@@ -413,10 +413,34 @@ var PropLine = class {
|
|
|
413
413
|
{ params }
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Search players by name fragment and get their stable `player_id`.
|
|
418
|
+
* Free tier. Pass the id in place of a name to {@link getPlayerHistory}
|
|
419
|
+
* or {@link getPlayerTrends}.
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* ```ts
|
|
423
|
+
* const res = await client.searchPlayers("baseball_mlb", "judge", { limit: 5 });
|
|
424
|
+
* for (const p of res.players) console.log(p.player_id, p.name, p.known_names);
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
searchPlayers(sport, search, options = {}) {
|
|
428
|
+
const params = { search };
|
|
429
|
+
if (options.limit !== void 0) {
|
|
430
|
+
params.limit = options.limit;
|
|
431
|
+
}
|
|
432
|
+
return this._request(
|
|
433
|
+
"GET",
|
|
434
|
+
`/sports/${encodeURIComponent(sport)}/players`,
|
|
435
|
+
{ params }
|
|
436
|
+
);
|
|
437
|
+
}
|
|
416
438
|
/**
|
|
417
439
|
* Recent resolved prop history for a player on a market.
|
|
418
440
|
*
|
|
419
441
|
* One entry per (event, bookmaker) pair. Pro: full. Free: redacted.
|
|
442
|
+
* `playerName` may be a name or a `player_id` like `"mlb:677951"`
|
|
443
|
+
* (see {@link searchPlayers}).
|
|
420
444
|
*/
|
|
421
445
|
getPlayerHistory(sport, playerName, options) {
|
|
422
446
|
const params = {
|
|
@@ -426,6 +450,9 @@ var PropLine = class {
|
|
|
426
450
|
if (options.bookmaker) {
|
|
427
451
|
params.bookmaker = options.bookmaker;
|
|
428
452
|
}
|
|
453
|
+
if (options.mainLineOnly !== void 0) {
|
|
454
|
+
params.main_line_only = options.mainLineOnly ? "true" : "false";
|
|
455
|
+
}
|
|
429
456
|
return this._request(
|
|
430
457
|
"GET",
|
|
431
458
|
`/sports/${encodeURIComponent(sport)}/players/${encodeURIComponent(playerName)}/history`,
|
|
@@ -477,7 +504,8 @@ var PropLine = class {
|
|
|
477
504
|
*
|
|
478
505
|
* Returns over/under/push splits over the last 5/10/20/50 graded games,
|
|
479
506
|
* the current streak, and the most recent game per market. Pro: full.
|
|
480
|
-
* Free: redacted.
|
|
507
|
+
* Free: redacted. `playerName` may be a name or a `player_id` like
|
|
508
|
+
* `"mlb:592450"` (see {@link searchPlayers}).
|
|
481
509
|
*/
|
|
482
510
|
getPlayerTrends(sportKey, playerName, options = {}) {
|
|
483
511
|
const params = {};
|
|
@@ -1080,7 +1108,7 @@ var Bookmakers = {
|
|
|
1080
1108
|
POLYMARKET: "polymarket",
|
|
1081
1109
|
PRIZEPICKS: "prizepicks"
|
|
1082
1110
|
};
|
|
1083
|
-
var VERSION = "0.
|
|
1111
|
+
var VERSION = "0.56.0";
|
|
1084
1112
|
export {
|
|
1085
1113
|
AuthError,
|
|
1086
1114
|
Bookmakers,
|