From 05353ccec4633b58ffab2b311c4358edce867b2f Mon Sep 17 00:00:00 2001 From: filifa Date: Sun, 28 Jul 2024 21:46:06 -0500 Subject: [PATCH] add example usage --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7c12e32..6512912 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,20 @@ games. Supply the game's PK (which can be retrieved with `mlblive schedule`) to receive updates as they happen, without needing to blindly query the `game` endpoint. +### Example +Use `mlblive schedule` to get the game PK(s) for today's Reds game: +``` +mlblive schedule -t cin +``` +Optionally, use `jq` to filter this output to *just* the game PK(s): +``` +mlblive schedule -t cin | jq '.dates[].games[].gamePk' +``` +Then, pass a PK to get live updates: +``` +mlblive subscribe -g +``` + ## Disclaimer This program and its author are not affiliated with MLB. Content supplied by MLB's Stats API is copyright 2024 MLB Advanced Media, L.P., and use of any