propline-cli 0.52.0 → 0.54.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 +7 -0
- package/dist/index.js +133 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -88,6 +88,11 @@ propline bets list --status settled
|
|
|
88
88
|
propline bets get 9012
|
|
89
89
|
propline bets untrack 9012
|
|
90
90
|
|
|
91
|
+
# Verified records: a public pick history at prop-line.com/record/<handle>
|
|
92
|
+
propline record show sharp_guy # anyone can read a record
|
|
93
|
+
propline record create --handle sharp_guy --name "Sharp Guy"
|
|
94
|
+
propline record pick picks.json # before the game, at a real book price
|
|
95
|
+
|
|
91
96
|
# Manage webhook subscriptions (Streaming tier)
|
|
92
97
|
propline webhooks list
|
|
93
98
|
propline webhooks create --url https://example.com/hook --events line_movement,resolution --sport baseball_mlb
|
|
@@ -146,6 +151,8 @@ propline player-games baseball_mlb "Aaron Judge" --limit 5 --opponent BOS \
|
|
|
146
151
|
| `propline book-accuracy [--days N] [--sport KEY]` | How well each sportsbook prices player props vs the market (free) |
|
|
147
152
|
| `propline golf-rounds <player> [--tour pga,liv] [--limit N]` | A golfer's completed rounds by tour + L5/L10/L20 averages (free) |
|
|
148
153
|
| `propline injuries <sport> [--team KC] [--status out,questionable]` | Current injury report for NFL, NCAAF, NBA, WNBA, NHL, MLB (free) |
|
|
154
|
+
| `propline lineups <sport> [--team BOS] [--event id]` | Projected and confirmed NBA starting lineups (free) |
|
|
155
|
+
| `propline lineups <sport> --history [--days 7] [--player name]` | Lineup changes over the last 1-90 days (free) |
|
|
149
156
|
| `propline injuries <sport> --history [--days 7] [--player name]` | Injury status changes over the last 1-90 days (free) |
|
|
150
157
|
| `propline referees <sport> [--search name] [--since YYYY-MM-DD]` | Referee card stats — cards per match, last and next match (32 soccer leagues, free) |
|
|
151
158
|
| `propline referees <sport> "<name>" [--limit N]` | One referee's matches with each team's cards (32 soccer leagues, free) |
|
package/dist/index.js
CHANGED
|
@@ -582,6 +582,54 @@ function cmdInjuries(sport, flags) {
|
|
|
582
582
|
printTable(r.players, cols);
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
|
+
function cmdLineups(sport, flags) {
|
|
586
|
+
return runCommand(async () => {
|
|
587
|
+
const client = buildClient(flags);
|
|
588
|
+
if (flags.history) {
|
|
589
|
+
const h = await client.getLineupHistory(sport, {
|
|
590
|
+
days: flags.days,
|
|
591
|
+
player: flags.player,
|
|
592
|
+
eventId: flags.event
|
|
593
|
+
});
|
|
594
|
+
if (flags.json) return printJson(h);
|
|
595
|
+
process.stdout.write(
|
|
596
|
+
`${h.sport} \u2014 ${h.count} lineup changes, last ${h.days} days` + (h.truncated ? " (truncated)" : "") + `
|
|
597
|
+
|
|
598
|
+
`
|
|
599
|
+
);
|
|
600
|
+
const label = (status, role) => [status, role].filter(Boolean).join(" ");
|
|
601
|
+
const cols2 = [
|
|
602
|
+
{ label: "WHEN", value: (c) => formatTime(c.changed_at) },
|
|
603
|
+
{ label: "TEAM", value: (c) => c.team_abbr },
|
|
604
|
+
{ label: "PLAYER", value: (c) => c.player_name },
|
|
605
|
+
{ label: "FROM", value: (c) => label(c.old_status, c.old_role) || "not listed" },
|
|
606
|
+
{ label: "TO", value: (c) => label(c.new_status, c.new_role) || "dropped" }
|
|
607
|
+
];
|
|
608
|
+
printTable(h.changes, cols2);
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
const r = await client.getLineups(sport, { team: flags.team, eventId: flags.event });
|
|
612
|
+
if (flags.json) return printJson(r);
|
|
613
|
+
process.stdout.write(`${r.sport} \u2014 ${r.count} games
|
|
614
|
+
|
|
615
|
+
`);
|
|
616
|
+
const rows = r.games.flatMap(
|
|
617
|
+
(g) => g.teams.flatMap(
|
|
618
|
+
(t) => t.players.map((p) => ({ event_id: g.event_id, team: t.team_abbr, ...p }))
|
|
619
|
+
)
|
|
620
|
+
);
|
|
621
|
+
const cols = [
|
|
622
|
+
{ label: "EVENT", value: (p) => p.event_id === null ? "-" : String(p.event_id) },
|
|
623
|
+
{ label: "TEAM", value: (p) => p.team },
|
|
624
|
+
{ label: "PLAYER", value: (p) => p.player_name },
|
|
625
|
+
{ label: "POS", value: (p) => p.position ?? "-" },
|
|
626
|
+
{ label: "ROLE", value: (p) => p.role },
|
|
627
|
+
{ label: "STATUS", value: (p) => p.status },
|
|
628
|
+
{ label: "SINCE", value: (p) => formatTime(p.since) }
|
|
629
|
+
];
|
|
630
|
+
printTable(rows, cols);
|
|
631
|
+
});
|
|
632
|
+
}
|
|
585
633
|
function cmdReferees(sport, name, flags) {
|
|
586
634
|
return runCommand(async () => {
|
|
587
635
|
const client = buildClient(flags);
|
|
@@ -1201,6 +1249,74 @@ function cmdBetsUntrack(id, flags) {
|
|
|
1201
1249
|
`);
|
|
1202
1250
|
});
|
|
1203
1251
|
}
|
|
1252
|
+
function cmdRecordShow(handle, flags) {
|
|
1253
|
+
return runCommand(async () => {
|
|
1254
|
+
const client = buildClient(flags);
|
|
1255
|
+
const rec = await client.getRecord(handle, { limit: flags.limit });
|
|
1256
|
+
if (flags.json) return printJson(rec);
|
|
1257
|
+
const line = (label, s) => `${label}: ${s.won}-${s.lost}${s.push_or_void ? `-${s.push_or_void}` : ""} ${s.units_profit > 0 ? "+" : ""}${s.units_profit.toFixed(2)}u ROI ${s.roi_pct == null ? "n/a" : `${s.roi_pct}%`}
|
|
1258
|
+
`;
|
|
1259
|
+
process.stdout.write(`${rec.display_name} (@${rec.handle})
|
|
1260
|
+
`);
|
|
1261
|
+
process.stdout.write(line("all time ", rec.all_time));
|
|
1262
|
+
process.stdout.write(line("last 30 days", rec.last_30_days));
|
|
1263
|
+
process.stdout.write(
|
|
1264
|
+
`pending: ${rec.pending} not yet started (hidden): ${rec.not_yet_started}
|
|
1265
|
+
|
|
1266
|
+
`
|
|
1267
|
+
);
|
|
1268
|
+
const cols = [
|
|
1269
|
+
{ label: "GAME DAY", value: (r) => formatTime(r.starts_at) },
|
|
1270
|
+
{
|
|
1271
|
+
label: "PICK",
|
|
1272
|
+
value: (r) => r.parlay ? `${r.legs.length}-leg parlay` : truncate(
|
|
1273
|
+
r.legs[0] ? `${r.legs[0].selection ?? ""} ${r.legs[0].side ?? ""} ${formatPoint(r.legs[0].point)} ${r.legs[0].market ?? ""}`.replace(/\s+/g, " ").trim() : "",
|
|
1274
|
+
48
|
|
1275
|
+
)
|
|
1276
|
+
},
|
|
1277
|
+
{ label: "PRICE", value: (r) => r.parlay ? "" : formatPrice(r.legs[0]?.price), numeric: true },
|
|
1278
|
+
{ label: "UNITS", value: (r) => String(r.stake), numeric: true },
|
|
1279
|
+
{ label: "RESULT", value: (r) => r.result },
|
|
1280
|
+
{ label: "+/-", value: (r) => r.profit == null ? "" : r.profit.toFixed(2), numeric: true }
|
|
1281
|
+
];
|
|
1282
|
+
printTable(rec.picks, cols);
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
function cmdRecordCreate(flags) {
|
|
1286
|
+
return runCommand(async () => {
|
|
1287
|
+
const client = buildClient(flags);
|
|
1288
|
+
const prof = await client.createRecord({
|
|
1289
|
+
handle: flags.handle,
|
|
1290
|
+
display_name: flags.name,
|
|
1291
|
+
bio: flags.bio
|
|
1292
|
+
});
|
|
1293
|
+
if (flags.json) return printJson(prof);
|
|
1294
|
+
process.stdout.write(`${prof.display_name} (@${prof.handle})
|
|
1295
|
+
${prof.url}
|
|
1296
|
+
`);
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
function cmdRecordMe(flags) {
|
|
1300
|
+
return runCommand(async () => {
|
|
1301
|
+
const client = buildClient(flags);
|
|
1302
|
+
const prof = await client.getMyRecord();
|
|
1303
|
+
if (flags.json) return printJson(prof);
|
|
1304
|
+
process.stdout.write(`${prof.display_name} (@${prof.handle})
|
|
1305
|
+
${prof.url}
|
|
1306
|
+
`);
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
function cmdRecordPick(file, flags) {
|
|
1310
|
+
return runCommand(async () => {
|
|
1311
|
+
const client = buildClient(flags);
|
|
1312
|
+
const raw = file === "-" ? await readStdin() : await readFile(file, "utf8");
|
|
1313
|
+
const picks = JSON.parse(raw);
|
|
1314
|
+
if (!Array.isArray(picks)) throw new Error("the file must hold a JSON array of picks");
|
|
1315
|
+
const res = await client.addVerifiedPicks(picks);
|
|
1316
|
+
if (flags.json) return printJson(res);
|
|
1317
|
+
printTrackedBets(res.bets);
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1204
1320
|
function cmdWebhooksList(flags) {
|
|
1205
1321
|
return runCommand(async () => {
|
|
1206
1322
|
const client = buildClient(flags);
|
|
@@ -1832,7 +1948,7 @@ function cmdParlay(file, flags) {
|
|
|
1832
1948
|
}
|
|
1833
1949
|
|
|
1834
1950
|
// src/index.ts
|
|
1835
|
-
var VERSION = "0.
|
|
1951
|
+
var VERSION = "0.54.0";
|
|
1836
1952
|
var program = new Command();
|
|
1837
1953
|
program.name("propline").description(
|
|
1838
1954
|
"PropLine CLI \u2014 query live odds, scores, +EV plays, prop resolution, and webhooks from the terminal."
|
|
@@ -1950,6 +2066,9 @@ program.command("injuries <sport>").option("-t, --team <team>", "team name or ab
|
|
|
1950
2066
|
).option("--history", "show status changes instead of the current report").option("-d, --days <n>", "with --history: 1-90 days (default 7)", (v) => parseInt(v, 10)).option("-p, --player <name>", "with --history: filter by player name").description("Injury report for NFL, NCAAF, NBA, WNBA, NHL, MLB (free)").action(function(sport) {
|
|
1951
2067
|
return cmdInjuries(sport, gather(this));
|
|
1952
2068
|
});
|
|
2069
|
+
program.command("lineups <sport>").option("-t, --team <team>", "team name or abbreviation, e.g. BOS").option("-e, --event <id>", "only this PropLine event id", (v) => parseInt(v, 10)).option("--history", "show lineup changes instead of the current lineups").option("-d, --days <n>", "with --history: 1-90 days (default 7)", (v) => parseInt(v, 10)).option("-p, --player <name>", "with --history: filter by player name").description("Projected and confirmed NBA starting lineups (free)").action(function(sport) {
|
|
2070
|
+
return cmdLineups(sport, gather(this));
|
|
2071
|
+
});
|
|
1953
2072
|
program.command("referees <sport> [name]").option("--search <text>", "without a name: filter referees by name substring").option("--since <date>", "only matches on or after YYYY-MM-DD").option("--until <date>", "only matches before YYYY-MM-DD").option("-l, --limit <n>", "with a name: max matches, 1-500 (default 100)", (v) => parseInt(v, 10)).description("Referee card stats, or one referee's matches (32 soccer leagues, free)").action(function(sport, name) {
|
|
1954
2073
|
return cmdReferees(sport, name, gather(this));
|
|
1955
2074
|
});
|
|
@@ -2132,6 +2251,19 @@ bets.command("get").argument("<id>", "bet id").description("Show one tracked bet
|
|
|
2132
2251
|
bets.command("untrack").argument("<id>", "bet id").description("Stop tracking a bet").action(function(id) {
|
|
2133
2252
|
return cmdBetsUntrack(id, gather(this));
|
|
2134
2253
|
});
|
|
2254
|
+
var record = program.command("record").description("Verified records: a public, graded pick history");
|
|
2255
|
+
record.command("show").argument("<handle>", "the record's handle").option("-l, --limit <n>", "picks to show (default 100, max 200)", (v) => parseInt(v, 10)).description("Show a tipster's public verified record").action(function(handle) {
|
|
2256
|
+
return cmdRecordShow(handle, gather(this));
|
|
2257
|
+
});
|
|
2258
|
+
record.command("create").option("--handle <handle>", "3-30 chars, a-z 0-9 _ - (required the first time, then fixed)").option("--name <name>", "display name").option("--bio <text>", "one line, up to 160 characters").description("Create your record, or edit its name / bio (Hobby+)").action(function() {
|
|
2259
|
+
return cmdRecordCreate(gather(this));
|
|
2260
|
+
});
|
|
2261
|
+
record.command("me").description("Show your record profile and link").action(function() {
|
|
2262
|
+
return cmdRecordMe(gather(this));
|
|
2263
|
+
});
|
|
2264
|
+
record.command("pick").argument("<file>", "JSON file holding an array of picks ('-' for stdin)").description("Add verified picks to your record (cannot be undone)").action(function(file) {
|
|
2265
|
+
return cmdRecordPick(file, gather(this));
|
|
2266
|
+
});
|
|
2135
2267
|
var webhooks = program.command("webhooks").description("Manage webhook subscriptions (Streaming tier)");
|
|
2136
2268
|
webhooks.command("list").description("List your webhook subscriptions").action(function() {
|
|
2137
2269
|
return cmdWebhooksList(gather(this));
|