Compare commits
10 Commits
5bfec4d5d9
...
4bfec7c12c
Author | SHA1 | Date |
---|---|---|
|
4bfec7c12c | |
|
7968e0f8cb | |
|
cddcf64dde | |
|
d8bc8be4f1 | |
|
7c18c0a396 | |
|
de3a09f145 | |
|
4ea313151f | |
|
55d69a552e | |
|
551b39652b | |
|
003f7b1309 |
34
README.md
34
README.md
|
@ -1,49 +1,49 @@
|
||||||
# mlblive
|
# mlbstats
|
||||||
mlblive is a CLI tool for retrieving data from Major League Baseball's Stats
|
mlbstats is a CLI tool for retrieving data from Major League Baseball's Stats
|
||||||
API, including efficient retrieval of live game data. Unofficial documentation
|
API, including efficient retrieval of live game data. Unofficial documentation
|
||||||
on the Stats API can be found
|
on the Stats API can be found
|
||||||
[here](https://github.com/toddrob99/MLB-StatsAPI/wiki/Endpoints) (thanks to
|
[here](https://github.com/toddrob99/MLB-StatsAPI/wiki/Endpoints) (thanks to
|
||||||
GitHub user toddrob99 for this resource).
|
GitHub user toddrob99 for this resource).
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
mlblive provides sub-commands to query a subset of the Stats API endpoints. As
|
mlbstats provides sub-commands to query a subset of the Stats API endpoints. As
|
||||||
of the time of writing, the sub-commands are:
|
of the time of writing, the sub-commands are:
|
||||||
* `mlblive content` (accesses the `game_content` endpoint)
|
* `mlbstats content` (accesses the `game_content` endpoint)
|
||||||
* `mlblive feed` (accesses the `game` endpoint)
|
* `mlbstats feed` (accesses the `game` endpoint)
|
||||||
* `mlblive schedule` (accesses the `schedule` endpoint)
|
* `mlbstats schedule` (accesses the `schedule` endpoint)
|
||||||
* `mlblive standings` (accesses the `standings` endpoint)
|
* `mlbstats standings` (accesses the `standings` endpoint)
|
||||||
* `mlblive subscribe` (accesses the game WebSocket endpoint)
|
* `mlbstats subscribe` (accesses the game WebSocket endpoint)
|
||||||
|
|
||||||
Each sub-command outputs the raw JSON response from the API. This can then be
|
Each sub-command outputs the raw JSON response from the API. This can then be
|
||||||
piped into other commands like `jq` for further processing. See [this
|
piped into other commands like `jq` for further processing. See [this
|
||||||
repo](https://scm.dairydemon.net/filifa/mlblive-mastodon-scripts) for examples
|
repo](https://scm.dairydemon.net/filifa/mlbstats-mastodon-scripts) for examples
|
||||||
of how the author use this program for posting live score updates and
|
of how the author uses this program for posting live score updates and
|
||||||
highlights to Mastodon.
|
highlights to Mastodon.
|
||||||
|
|
||||||
Note that mlblive does not provide sub-commands for every endpoint, or flags
|
Note that mlbstats does not provide sub-commands for every endpoint, or flags
|
||||||
for every parameter of every endpoint. The functionality provided was
|
for every parameter of every endpoint. The functionality provided was
|
||||||
prioritized based on the author's own needs. However, the author has made every
|
prioritized based on the author's own needs. However, the author has made every
|
||||||
effort to make the current functionality's code easy to read, and hopes it will
|
effort to make the current functionality's code easy to read, and hopes it will
|
||||||
be similarly easy for other developers to extend functionality as needed.
|
be similarly easy for other developers to extend functionality as needed.
|
||||||
|
|
||||||
### subscribe sub-command
|
### subscribe sub-command
|
||||||
`mlblive subscribe` provides an efficient way to obtain live data on active MLB
|
`mlbstats subscribe` provides an efficient way to obtain live data on active MLB
|
||||||
games. Supply the game's PK (which can be retrieved with `mlblive schedule`) to
|
games. Supply the game's PK (which can be retrieved with `mlbstats schedule`) to
|
||||||
receive updates as they happen, without needing to blindly query the `game`
|
receive updates as they happen, without needing to blindly query the `game`
|
||||||
endpoint.
|
endpoint.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
Use `mlblive schedule` to get the game PK(s) for today's Reds game:
|
Use `mlbstats schedule` to get the game PK(s) for today's Reds game:
|
||||||
```
|
```
|
||||||
mlblive schedule -t cin
|
mlbstats schedule -t cin
|
||||||
```
|
```
|
||||||
Optionally, use `jq` to filter this output to *just* the game PK(s):
|
Optionally, use `jq` to filter this output to *just* the game PK(s):
|
||||||
```
|
```
|
||||||
mlblive schedule -t cin | jq '.dates[].games[].gamePk'
|
mlbstats schedule -t cin | jq '.dates[].games[].gamePk'
|
||||||
```
|
```
|
||||||
Then, pass a PK to get live updates:
|
Then, pass a PK to get live updates:
|
||||||
```
|
```
|
||||||
mlblive subscribe -g <gamePk>
|
mlbstats subscribe -g <gamePk>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// AnalyticsAPIService AnalyticsAPI service
|
// AnalyticsAPIService AnalyticsAPI service
|
||||||
type AnalyticsAPIService service
|
type AnalyticsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// AttendanceAPIService AttendanceAPI service
|
// AttendanceAPIService AttendanceAPI service
|
||||||
type AttendanceAPIService service
|
type AttendanceAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// AwardsAPIService AwardsAPI service
|
// AwardsAPIService AwardsAPI service
|
||||||
type AwardsAPIService service
|
type AwardsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// BatTrackingAPIService BatTrackingAPI service
|
// BatTrackingAPIService BatTrackingAPI service
|
||||||
type BatTrackingAPIService service
|
type BatTrackingAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// BiomechanicsAPIService BiomechanicsAPI service
|
// BiomechanicsAPIService BiomechanicsAPI service
|
||||||
type BiomechanicsAPIService service
|
type BiomechanicsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// BroadcastAPIService BroadcastAPI service
|
// BroadcastAPIService BroadcastAPI service
|
||||||
type BroadcastAPIService service
|
type BroadcastAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// ConferenceAPIService ConferenceAPI service
|
// ConferenceAPIService ConferenceAPI service
|
||||||
type ConferenceAPIService service
|
type ConferenceAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// DivisionAPIService DivisionAPI service
|
// DivisionAPIService DivisionAPI service
|
||||||
type DivisionAPIService service
|
type DivisionAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// DraftAPIService DraftAPI service
|
// DraftAPIService DraftAPI service
|
||||||
type DraftAPIService service
|
type DraftAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// GameAPIService GameAPI service
|
// GameAPIService GameAPI service
|
||||||
type GameAPIService service
|
type GameAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// GamePaceAPIService GamePaceAPI service
|
// GamePaceAPIService GamePaceAPI service
|
||||||
type GamePaceAPIService service
|
type GamePaceAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// HighLowAPIService HighLowAPI service
|
// HighLowAPIService HighLowAPI service
|
||||||
type HighLowAPIService service
|
type HighLowAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// HomerunDerbyAPIService HomerunDerbyAPI service
|
// HomerunDerbyAPIService HomerunDerbyAPI service
|
||||||
type HomerunDerbyAPIService service
|
type HomerunDerbyAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// JobAPIService JobAPI service
|
// JobAPIService JobAPI service
|
||||||
type JobAPIService service
|
type JobAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// LeagueAPIService LeagueAPI service
|
// LeagueAPIService LeagueAPI service
|
||||||
type LeagueAPIService service
|
type LeagueAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// MilestonesAPIService MilestonesAPI service
|
// MilestonesAPIService MilestonesAPI service
|
||||||
type MilestonesAPIService service
|
type MilestonesAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// MiscAPIService MiscAPI service
|
// MiscAPIService MiscAPI service
|
||||||
type MiscAPIService service
|
type MiscAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// PersonAPIService PersonAPI service
|
// PersonAPIService PersonAPI service
|
||||||
type PersonAPIService service
|
type PersonAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// PredictionsAPIService PredictionsAPI service
|
// PredictionsAPIService PredictionsAPI service
|
||||||
type PredictionsAPIService service
|
type PredictionsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// ReviewsAPIService ReviewsAPI service
|
// ReviewsAPIService ReviewsAPI service
|
||||||
type ReviewsAPIService service
|
type ReviewsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// ScheduleAPIService ScheduleAPI service
|
// ScheduleAPIService ScheduleAPI service
|
||||||
type ScheduleAPIService service
|
type ScheduleAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// SeasonAPIService SeasonAPI service
|
// SeasonAPIService SeasonAPI service
|
||||||
type SeasonAPIService service
|
type SeasonAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// SkeletalAPIService SkeletalAPI service
|
// SkeletalAPIService SkeletalAPI service
|
||||||
type SkeletalAPIService service
|
type SkeletalAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// SportsAPIService SportsAPI service
|
// SportsAPIService SportsAPI service
|
||||||
type SportsAPIService service
|
type SportsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// StandingsAPIService StandingsAPI service
|
// StandingsAPIService StandingsAPI service
|
||||||
type StandingsAPIService service
|
type StandingsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// StatsAPIService StatsAPI service
|
// StatsAPIService StatsAPI service
|
||||||
type StatsAPIService service
|
type StatsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// StreaksAPIService StreaksAPI service
|
// StreaksAPIService StreaksAPI service
|
||||||
type StreaksAPIService service
|
type StreaksAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// TeamsAPIService TeamsAPI service
|
// TeamsAPIService TeamsAPI service
|
||||||
type TeamsAPIService service
|
type TeamsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// TransactionsAPIService TransactionsAPI service
|
// TransactionsAPIService TransactionsAPI service
|
||||||
type TransactionsAPIService service
|
type TransactionsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -18,7 +33,6 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// UniformsAPIService UniformsAPI service
|
// UniformsAPIService UniformsAPI service
|
||||||
type UniformsAPIService service
|
type UniformsAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// VenuesAPIService VenuesAPI service
|
// VenuesAPIService VenuesAPI service
|
||||||
type VenuesAPIService service
|
type VenuesAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -19,7 +34,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// WeatherAPIService WeatherAPI service
|
// WeatherAPIService WeatherAPI service
|
||||||
type WeatherAPIService service
|
type WeatherAPIService service
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -31,7 +46,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
@ -94,8 +109,7 @@ func NewConfiguration() *Configuration {
|
||||||
Description: "No description provided",
|
Description: "No description provided",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
OperationServers: map[string]ServerConfigurations{
|
OperationServers: map[string]ServerConfigurations{},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
||||||
#
|
|
||||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
||||||
|
|
||||||
git_user_id=$1
|
|
||||||
git_repo_id=$2
|
|
||||||
release_note=$3
|
|
||||||
git_host=$4
|
|
||||||
|
|
||||||
if [ "$git_host" = "" ]; then
|
|
||||||
git_host=""
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$git_user_id" = "" ]; then
|
|
||||||
git_user_id=""
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$git_repo_id" = "" ]; then
|
|
||||||
git_repo_id=""
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$release_note" = "" ]; then
|
|
||||||
release_note=""
|
|
||||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Initialize the local directory as a Git repository
|
|
||||||
git init
|
|
||||||
|
|
||||||
# Adds the files in the local repository and stages them for commit.
|
|
||||||
git add .
|
|
||||||
|
|
||||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
||||||
git commit -m "$release_note"
|
|
||||||
|
|
||||||
# Sets the new remote
|
|
||||||
git_remote=$(git remote)
|
|
||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
||||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
||||||
else
|
|
||||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
git pull origin master
|
|
||||||
|
|
||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
||||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
||||||
git push origin master 2>&1 | grep -v 'To https'
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing AnalyticsAPIService
|
Testing AnalyticsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing AnalyticsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_AnalyticsAPIService(t *testing.T) {
|
func Test_api_AnalyticsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing AttendanceAPIService
|
Testing AttendanceAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing AttendanceAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_AttendanceAPIService(t *testing.T) {
|
func Test_api_AttendanceAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing AwardsAPIService
|
Testing AwardsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing AwardsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_AwardsAPIService(t *testing.T) {
|
func Test_api_AwardsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing BatTrackingAPIService
|
Testing BatTrackingAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing BatTrackingAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_BatTrackingAPIService(t *testing.T) {
|
func Test_api_BatTrackingAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing BiomechanicsAPIService
|
Testing BiomechanicsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing BiomechanicsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_BiomechanicsAPIService(t *testing.T) {
|
func Test_api_BiomechanicsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing BroadcastAPIService
|
Testing BroadcastAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing BroadcastAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_BroadcastAPIService(t *testing.T) {
|
func Test_api_BroadcastAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing ConferenceAPIService
|
Testing ConferenceAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing ConferenceAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_ConferenceAPIService(t *testing.T) {
|
func Test_api_ConferenceAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing DivisionAPIService
|
Testing DivisionAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing DivisionAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_DivisionAPIService(t *testing.T) {
|
func Test_api_DivisionAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing DraftAPIService
|
Testing DraftAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing DraftAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_DraftAPIService(t *testing.T) {
|
func Test_api_DraftAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing GamePaceAPIService
|
Testing GamePaceAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing GamePaceAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_GamePaceAPIService(t *testing.T) {
|
func Test_api_GamePaceAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing GameAPIService
|
Testing GameAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing GameAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_GameAPIService(t *testing.T) {
|
func Test_api_GameAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing HighLowAPIService
|
Testing HighLowAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing HighLowAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_HighLowAPIService(t *testing.T) {
|
func Test_api_HighLowAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing HomerunDerbyAPIService
|
Testing HomerunDerbyAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing HomerunDerbyAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_HomerunDerbyAPIService(t *testing.T) {
|
func Test_api_HomerunDerbyAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing JobAPIService
|
Testing JobAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing JobAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_JobAPIService(t *testing.T) {
|
func Test_api_JobAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing LeagueAPIService
|
Testing LeagueAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing LeagueAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_LeagueAPIService(t *testing.T) {
|
func Test_api_LeagueAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing MilestonesAPIService
|
Testing MilestonesAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing MilestonesAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_MilestonesAPIService(t *testing.T) {
|
func Test_api_MilestonesAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing MiscAPIService
|
Testing MiscAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing MiscAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_MiscAPIService(t *testing.T) {
|
func Test_api_MiscAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing PersonAPIService
|
Testing PersonAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing PersonAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_PersonAPIService(t *testing.T) {
|
func Test_api_PersonAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing PredictionsAPIService
|
Testing PredictionsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing PredictionsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_PredictionsAPIService(t *testing.T) {
|
func Test_api_PredictionsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing ReviewsAPIService
|
Testing ReviewsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing ReviewsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_ReviewsAPIService(t *testing.T) {
|
func Test_api_ReviewsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing ScheduleAPIService
|
Testing ScheduleAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing ScheduleAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_ScheduleAPIService(t *testing.T) {
|
func Test_api_ScheduleAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing SeasonAPIService
|
Testing SeasonAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing SeasonAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_SeasonAPIService(t *testing.T) {
|
func Test_api_SeasonAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing SkeletalAPIService
|
Testing SkeletalAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing SkeletalAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_SkeletalAPIService(t *testing.T) {
|
func Test_api_SkeletalAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing SportsAPIService
|
Testing SportsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing SportsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_SportsAPIService(t *testing.T) {
|
func Test_api_SportsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing StandingsAPIService
|
Testing StandingsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing StandingsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_StandingsAPIService(t *testing.T) {
|
func Test_api_StandingsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing StatsAPIService
|
Testing StatsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing StatsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_StatsAPIService(t *testing.T) {
|
func Test_api_StatsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing StreaksAPIService
|
Testing StreaksAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing StreaksAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_StreaksAPIService(t *testing.T) {
|
func Test_api_StreaksAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing TeamsAPIService
|
Testing TeamsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing TeamsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_TeamsAPIService(t *testing.T) {
|
func Test_api_TeamsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing TransactionsAPIService
|
Testing TransactionsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing TransactionsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_TransactionsAPIService(t *testing.T) {
|
func Test_api_TransactionsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing UniformsAPIService
|
Testing UniformsAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing UniformsAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_UniformsAPIService(t *testing.T) {
|
func Test_api_UniformsAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing VenuesAPIService
|
Testing VenuesAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing VenuesAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_VenuesAPIService(t *testing.T) {
|
func Test_api_VenuesAPIService(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Testing WeatherAPIService
|
Testing WeatherAPIService
|
||||||
|
@ -10,11 +25,11 @@ Testing WeatherAPIService
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
openapiclient "//"
|
||||||
"context"
|
"context"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"testing"
|
"testing"
|
||||||
openapiclient "//"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_api_WeatherAPIService(t *testing.T) {
|
func Test_api_WeatherAPIService(t *testing.T) {
|
||||||
|
|
15
api/utils.go
15
api/utils.go
|
@ -1,4 +1,19 @@
|
||||||
/*
|
/*
|
||||||
|
Copyright © 2025 filifa
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
Foundation, either version 3 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with
|
||||||
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
Stats API Documentation
|
Stats API Documentation
|
||||||
|
|
||||||
Official API for Major League Baseball.
|
Official API for Major League Baseball.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
@ -35,8 +35,7 @@ var statsAPIConfiguration = &api.Configuration{
|
||||||
Description: "No description provided",
|
Description: "No description provided",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
OperationServers: map[string]api.ServerConfigurations{
|
OperationServers: map[string]api.ServerConfigurations{},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var statsAPIClient = api.NewAPIClient(statsAPIConfiguration)
|
var statsAPIClient = api.NewAPIClient(statsAPIConfiguration)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -61,6 +61,6 @@ func init() {
|
||||||
|
|
||||||
// Cobra supports local flags which will only run when this command
|
// Cobra supports local flags which will only run when this command
|
||||||
// is called directly, e.g.:
|
// is called directly, e.g.:
|
||||||
contentCmd.Flags().Int32VarP(&gamePk, "gamePk", "g", 0, "game PK")
|
contentCmd.Flags().IntVarP(&gamePk, "gamePk", "g", 0, "game PK")
|
||||||
contentCmd.MarkFlagRequired("gamePk")
|
contentCmd.MarkFlagRequired("gamePk")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -61,6 +61,6 @@ func init() {
|
||||||
|
|
||||||
// Cobra supports local flags which will only run when this command
|
// Cobra supports local flags which will only run when this command
|
||||||
// is called directly, e.g.:
|
// is called directly, e.g.:
|
||||||
feedCmd.Flags().Int32VarP(&gamePk, "gamePk", "g", 0, "game PK")
|
feedCmd.Flags().IntVarP(&gamePk, "gamePk", "g", 0, "game PK")
|
||||||
feedCmd.MarkFlagRequired("gamePk")
|
feedCmd.MarkFlagRequired("gamePk")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
@ -20,7 +20,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// retrieved from https://statsapi.mlb.com/api/v1/leagues
|
// retrieved from https://statsapi.mlb.com/api/v1/leagues
|
||||||
var leagueIDs = map[string]int32{
|
var leagueIDs = map[string]int{
|
||||||
"al": 103,
|
"al": 103,
|
||||||
"nl": 104,
|
"nl": 104,
|
||||||
"nn2": 431,
|
"nn2": 431,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
|
|
||||||
// rootCmd represents the base command when called without any subcommands
|
// rootCmd represents the base command when called without any subcommands
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "mlblive",
|
Use: "mlbstats",
|
||||||
Short: "Command line tools for Major League Baseball's Stats API",
|
Short: "Command line tools for Major League Baseball's Stats API",
|
||||||
Long: `Command line tools for Major League Baseball's Stats API.`,
|
Long: `Command line tools for Major League Baseball's Stats API.`,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
@ -20,7 +20,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// retrieved from https://statsapi.mlb.com/api/v1/sports
|
// retrieved from https://statsapi.mlb.com/api/v1/sports
|
||||||
var sportIDs = map[string]int32{
|
var sportIDs = map[string]int{
|
||||||
"mlb": 1,
|
"mlb": 1,
|
||||||
"aaa": 11,
|
"aaa": 11,
|
||||||
"aa": 12,
|
"aa": 12,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,7 +28,7 @@ import (
|
||||||
var league leagueAbbr
|
var league leagueAbbr
|
||||||
|
|
||||||
func standings(cmd *cobra.Command, args []string) {
|
func standings(cmd *cobra.Command, args []string) {
|
||||||
var leagueIds []int32
|
var leagueIds []int
|
||||||
leagueIds = append(leagueIds, leagueIDs[string(league)])
|
leagueIds = append(leagueIds, leagueIDs[string(league)])
|
||||||
|
|
||||||
req := statsAPIClient.StandingsAPI.Standings1(context.Background(), "regularSeason")
|
req := statsAPIClient.StandingsAPI.Standings1(context.Background(), "regularSeason")
|
||||||
|
|
105
cmd/subscribe.go
105
cmd/subscribe.go
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,7 +30,21 @@ import (
|
||||||
"scm.dairydemon.net/filifa/mlbstats/api"
|
"scm.dairydemon.net/filifa/mlbstats/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
var gamePk int32
|
var gamePk int
|
||||||
|
|
||||||
|
func extractTimestamp(body []byte) (any, error) {
|
||||||
|
var v any
|
||||||
|
err := json.Unmarshal(body, &v)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
vobj := v.(map[string]any)
|
||||||
|
metaData := vobj["metaData"].(map[string]any)
|
||||||
|
timestamp := metaData["timeStamp"]
|
||||||
|
|
||||||
|
return timestamp, nil
|
||||||
|
}
|
||||||
|
|
||||||
func extractPatches(resp []byte) ([]jsonpatch.Patch, error) {
|
func extractPatches(resp []byte) ([]jsonpatch.Patch, error) {
|
||||||
var patches []jsonpatch.Patch
|
var patches []jsonpatch.Patch
|
||||||
|
@ -46,49 +60,48 @@ func extractPatches(resp []byte) ([]jsonpatch.Patch, error) {
|
||||||
patches = append(patches, patch)
|
patches = append(patches, patch)
|
||||||
}
|
}
|
||||||
|
|
||||||
return patches, err
|
return patches, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func patch(body []byte, client *api.APIClient) error {
|
func requestPatches(timestamp any, client *api.APIClient) ([]jsonpatch.Patch, error) {
|
||||||
var v any
|
|
||||||
err := json.Unmarshal(body, &v)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
vobj := v.(map[string]any)
|
|
||||||
metaData := vobj["metaData"].(map[string]any)
|
|
||||||
timestamp := metaData["timeStamp"]
|
|
||||||
|
|
||||||
req := client.GameAPI.LiveGameDiffPatchV1(context.Background(), gamePk)
|
req := client.GameAPI.LiveGameDiffPatchV1(context.Background(), gamePk)
|
||||||
req.StartTimecode(timestamp)
|
req = req.StartTimecode(timestamp)
|
||||||
|
|
||||||
resp, err := req.Execute()
|
resp, err := req.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
diffPatch, err := io.ReadAll(resp.Body)
|
diffPatch, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
patches, err := extractPatches(diffPatch)
|
return extractPatches(diffPatch)
|
||||||
|
}
|
||||||
|
|
||||||
|
func patch(body []byte, client *api.APIClient) ([]byte, error) {
|
||||||
|
timestamp, err := extractTimestamp(body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return body, err
|
||||||
|
}
|
||||||
|
|
||||||
|
patches, err := requestPatches(timestamp, client)
|
||||||
|
if err != nil {
|
||||||
|
return body, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, patch := range patches {
|
for _, patch := range patches {
|
||||||
body, err = patch.Apply(body)
|
body, err = patch.Apply(body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return body, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return body, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newWebsocket(gamePk int32) (*gamedayWebsocket, <-chan error, error) {
|
func newWebsocket(gamePk int) (*gamedayWebsocket, <-chan error, error) {
|
||||||
ws, err := newGamedayWebsocket(gamePk)
|
ws, err := newGamedayWebsocket(gamePk)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
@ -97,57 +110,59 @@ func newWebsocket(gamePk int32) (*gamedayWebsocket, <-chan error, error) {
|
||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
go ws.keepAlive(10*time.Second, ch)
|
go ws.keepAlive(10*time.Second, ch)
|
||||||
|
|
||||||
return ws, ch, err
|
return ws, ch, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleUnexpectedClose(body []byte, client *api.APIClient) (*gamedayWebsocket, error) {
|
func handleUnexpectedClose(client *api.APIClient) ([]byte, *gamedayWebsocket, error) {
|
||||||
ws, _, err := newWebsocket(gamePk)
|
ws, _, err := newWebsocket(gamePk)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
req := client.GameAPI.LiveGameV1(context.Background(), gamePk)
|
req := client.GameAPI.LiveGameV1(context.Background(), gamePk)
|
||||||
resp, err := req.Execute()
|
resp, err := req.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ws, err
|
return nil, ws, err
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err = io.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
return ws, err
|
return body, ws, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateFeed(body []byte, ws *gamedayWebsocket, client *api.APIClient) error {
|
func handlePush(ws *gamedayWebsocket, client *api.APIClient) ([]byte, error) {
|
||||||
var p push
|
var p push
|
||||||
err := ws.ReadJSON(&p)
|
err := ws.ReadJSON(&p)
|
||||||
if websocket.IsUnexpectedCloseError(err, GameFinalCode, GameUnavailableCode) {
|
if websocket.IsUnexpectedCloseError(err, GameFinalCode, GameUnavailableCode) {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
|
||||||
newWs, err := handleUnexpectedClose(body, client)
|
body, newWs, err := handleUnexpectedClose(client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return body, err
|
||||||
}
|
}
|
||||||
|
|
||||||
*ws = *newWs
|
*ws = *newWs
|
||||||
return err
|
return body, nil
|
||||||
} else if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = patch(body, client)
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateFeed(body []byte, client *api.APIClient) ([]byte, error) {
|
||||||
|
body, err := patch(body, client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
req := client.GameAPI.LiveGameV1(context.Background(), gamePk)
|
req := client.GameAPI.LiveGameV1(context.Background(), gamePk)
|
||||||
resp, err := req.Execute()
|
resp, err := req.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return body, err
|
||||||
}
|
}
|
||||||
|
|
||||||
body, err = io.ReadAll(resp.Body)
|
body, err = io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return body, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return body, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func subscribe(cmd *cobra.Command, args []string) {
|
func subscribe(cmd *cobra.Command, args []string) {
|
||||||
|
@ -164,15 +179,23 @@ func subscribe(cmd *cobra.Command, args []string) {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for {
|
|
||||||
body, err := io.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for {
|
||||||
fmt.Println(string(body))
|
fmt.Println(string(body))
|
||||||
|
|
||||||
err = updateFeed(body, ws, statsAPIClient)
|
newBody, err := handlePush(ws, statsAPIClient)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
} else if newBody != nil {
|
||||||
|
body = newBody
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err = updateFeed(body, statsAPIClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -202,6 +225,6 @@ func init() {
|
||||||
|
|
||||||
// Cobra supports local flags which will only run when this command
|
// Cobra supports local flags which will only run when this command
|
||||||
// is called directly, e.g.:
|
// is called directly, e.g.:
|
||||||
subscribeCmd.Flags().Int32VarP(&gamePk, "gamePk", "g", 0, "game PK")
|
subscribeCmd.Flags().IntVarP(&gamePk, "gamePk", "g", 0, "game PK")
|
||||||
subscribeCmd.MarkFlagRequired("gamePk")
|
subscribeCmd.MarkFlagRequired("gamePk")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
@ -20,7 +20,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// retrieved from https://statsapi.mlb.com/api/v1/teams
|
// retrieved from https://statsapi.mlb.com/api/v1/teams
|
||||||
var teamIDs = map[string]int32{
|
var teamIDs = map[string]int{
|
||||||
"laa": 108,
|
"laa": 108,
|
||||||
"az": 109,
|
"az": 109,
|
||||||
"bal": 110,
|
"bal": 110,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2024 filifa
|
Copyright © 2024,2025 filifa
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under
|
This program is free software: you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
|
@ -43,7 +43,7 @@ type gamedayWebsocket struct {
|
||||||
|
|
||||||
// NewGamedayWebsocket creates a statsapi.GamedayWebsocket using the Stats API
|
// NewGamedayWebsocket creates a statsapi.GamedayWebsocket using the Stats API
|
||||||
// websocket URL and establishes a connection.
|
// websocket URL and establishes a connection.
|
||||||
func newGamedayWebsocket(gamePk int32) (*gamedayWebsocket, error) {
|
func newGamedayWebsocket(gamePk int) (*gamedayWebsocket, error) {
|
||||||
ws := gamedayWebsocket{
|
ws := gamedayWebsocket{
|
||||||
baseURL: url.URL{
|
baseURL: url.URL{
|
||||||
Scheme: "wss",
|
Scheme: "wss",
|
||||||
|
@ -55,9 +55,9 @@ func newGamedayWebsocket(gamePk int32) (*gamedayWebsocket, error) {
|
||||||
return &ws, err
|
return &ws, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *gamedayWebsocket) init(gamePk int32) error {
|
func (g *gamedayWebsocket) init(gamePk int) error {
|
||||||
endpoint := url.URL{
|
endpoint := url.URL{
|
||||||
Path: "api/v1/game/push/subscribe/gameday/" + strconv.Itoa(int(gamePk)),
|
Path: "api/v1/game/push/subscribe/gameday/" + strconv.Itoa(gamePk),
|
||||||
}
|
}
|
||||||
|
|
||||||
url := g.baseURL.ResolveReference(&endpoint)
|
url := g.baseURL.ResolveReference(&endpoint)
|
||||||
|
|
Loading…
Reference in New Issue