add example usage

This commit is contained in:
filifa 2024-07-28 21:46:06 -05:00
parent 3eb0271f39
commit 05353ccec4
1 changed files with 14 additions and 0 deletions

View File

@ -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 <gamePk>
```
## 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