Compare commits
29 Commits
Author | SHA1 | Date |
---|---|---|
|
4bfec7c12c | |
|
7968e0f8cb | |
|
cddcf64dde | |
|
d8bc8be4f1 | |
|
7c18c0a396 | |
|
de3a09f145 | |
|
4ea313151f | |
|
55d69a552e | |
|
551b39652b | |
|
003f7b1309 | |
|
5bfec4d5d9 | |
|
79f8faf583 | |
|
db63afa8c1 | |
|
e5f859cdfc | |
|
892a2a3827 | |
|
a2c1d2fb15 | |
|
4f1114f297 | |
|
934db53dad | |
|
638fb44bd0 | |
|
35a9a26fbb | |
|
4429a835e0 | |
|
64e2ee31e8 | |
|
46664bc419 | |
|
7526a60c0e | |
|
0c4f307d29 | |
|
abdfd503fd | |
|
481ae64cc1 | |
|
4bec2914fa | |
|
137400f3fb |
|
@ -1 +1 @@
|
||||||
mlblive
|
mlbstats
|
||||||
|
|
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
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Folders
|
||||||
|
_obj
|
||||||
|
_test
|
||||||
|
|
||||||
|
# Architecture specific extensions/prefixes
|
||||||
|
*.[568vq]
|
||||||
|
[568vq].out
|
||||||
|
|
||||||
|
*.cgo1.go
|
||||||
|
*.cgo2.c
|
||||||
|
_cgo_defun.c
|
||||||
|
_cgo_gotypes.go
|
||||||
|
_cgo_export.*
|
||||||
|
|
||||||
|
_testmain.go
|
||||||
|
|
||||||
|
*.exe
|
||||||
|
*.test
|
||||||
|
*.prof
|
|
@ -0,0 +1,23 @@
|
||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
|
@ -0,0 +1,106 @@
|
||||||
|
.gitignore
|
||||||
|
.openapi-generator-ignore
|
||||||
|
.travis.yml
|
||||||
|
README.md
|
||||||
|
api/openapi.yaml
|
||||||
|
api_analytics.go
|
||||||
|
api_attendance.go
|
||||||
|
api_awards.go
|
||||||
|
api_bat_tracking.go
|
||||||
|
api_biomechanics.go
|
||||||
|
api_broadcast.go
|
||||||
|
api_conference.go
|
||||||
|
api_division.go
|
||||||
|
api_draft.go
|
||||||
|
api_game.go
|
||||||
|
api_game_pace.go
|
||||||
|
api_high_low.go
|
||||||
|
api_homerun_derby.go
|
||||||
|
api_job.go
|
||||||
|
api_league.go
|
||||||
|
api_milestones.go
|
||||||
|
api_misc.go
|
||||||
|
api_person.go
|
||||||
|
api_predictions.go
|
||||||
|
api_reviews.go
|
||||||
|
api_schedule.go
|
||||||
|
api_season.go
|
||||||
|
api_skeletal.go
|
||||||
|
api_sports.go
|
||||||
|
api_standings.go
|
||||||
|
api_stats.go
|
||||||
|
api_streaks.go
|
||||||
|
api_teams.go
|
||||||
|
api_transactions.go
|
||||||
|
api_uniforms.go
|
||||||
|
api_venues.go
|
||||||
|
api_weather.go
|
||||||
|
client.go
|
||||||
|
configuration.go
|
||||||
|
docs/AnalyticsAPI.md
|
||||||
|
docs/AttendanceAPI.md
|
||||||
|
docs/AwardsAPI.md
|
||||||
|
docs/BatTrackingAPI.md
|
||||||
|
docs/BiomechanicsAPI.md
|
||||||
|
docs/BroadcastAPI.md
|
||||||
|
docs/ConferenceAPI.md
|
||||||
|
docs/DivisionAPI.md
|
||||||
|
docs/DraftAPI.md
|
||||||
|
docs/GameAPI.md
|
||||||
|
docs/GamePaceAPI.md
|
||||||
|
docs/HighLowAPI.md
|
||||||
|
docs/HomerunDerbyAPI.md
|
||||||
|
docs/JobAPI.md
|
||||||
|
docs/LeagueAPI.md
|
||||||
|
docs/MilestonesAPI.md
|
||||||
|
docs/MiscAPI.md
|
||||||
|
docs/PersonAPI.md
|
||||||
|
docs/PredictionsAPI.md
|
||||||
|
docs/ReviewsAPI.md
|
||||||
|
docs/ScheduleAPI.md
|
||||||
|
docs/SeasonAPI.md
|
||||||
|
docs/SkeletalAPI.md
|
||||||
|
docs/SportsAPI.md
|
||||||
|
docs/StandingsAPI.md
|
||||||
|
docs/StatsAPI.md
|
||||||
|
docs/StreaksAPI.md
|
||||||
|
docs/TeamsAPI.md
|
||||||
|
docs/TransactionsAPI.md
|
||||||
|
docs/UniformsAPI.md
|
||||||
|
docs/VenuesAPI.md
|
||||||
|
docs/WeatherAPI.md
|
||||||
|
git_push.sh
|
||||||
|
response.go
|
||||||
|
test/api_analytics_test.go
|
||||||
|
test/api_attendance_test.go
|
||||||
|
test/api_awards_test.go
|
||||||
|
test/api_bat_tracking_test.go
|
||||||
|
test/api_biomechanics_test.go
|
||||||
|
test/api_broadcast_test.go
|
||||||
|
test/api_conference_test.go
|
||||||
|
test/api_division_test.go
|
||||||
|
test/api_draft_test.go
|
||||||
|
test/api_game_pace_test.go
|
||||||
|
test/api_game_test.go
|
||||||
|
test/api_high_low_test.go
|
||||||
|
test/api_homerun_derby_test.go
|
||||||
|
test/api_job_test.go
|
||||||
|
test/api_league_test.go
|
||||||
|
test/api_milestones_test.go
|
||||||
|
test/api_misc_test.go
|
||||||
|
test/api_person_test.go
|
||||||
|
test/api_predictions_test.go
|
||||||
|
test/api_reviews_test.go
|
||||||
|
test/api_schedule_test.go
|
||||||
|
test/api_season_test.go
|
||||||
|
test/api_skeletal_test.go
|
||||||
|
test/api_sports_test.go
|
||||||
|
test/api_standings_test.go
|
||||||
|
test/api_stats_test.go
|
||||||
|
test/api_streaks_test.go
|
||||||
|
test/api_teams_test.go
|
||||||
|
test/api_transactions_test.go
|
||||||
|
test/api_uniforms_test.go
|
||||||
|
test/api_venues_test.go
|
||||||
|
test/api_weather_test.go
|
||||||
|
utils.go
|
|
@ -0,0 +1 @@
|
||||||
|
7.12.0
|
|
@ -0,0 +1,8 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
install:
|
||||||
|
- go get -d -v .
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go build -v ./
|
||||||
|
|
|
@ -0,0 +1,305 @@
|
||||||
|
# Go API client for api
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
|
- API version: 2.0.0
|
||||||
|
- Package version: 1.0.0
|
||||||
|
- Generator version: 7.12.0
|
||||||
|
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install the following dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go get github.com/stretchr/testify/assert
|
||||||
|
go get golang.org/x/net/context
|
||||||
|
```
|
||||||
|
|
||||||
|
Put the package under your project folder and add the following in import:
|
||||||
|
|
||||||
|
```go
|
||||||
|
import api "//"
|
||||||
|
```
|
||||||
|
|
||||||
|
To use a proxy, set the environment variable `HTTP_PROXY`:
|
||||||
|
|
||||||
|
```go
|
||||||
|
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration of Server URL
|
||||||
|
|
||||||
|
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
|
||||||
|
|
||||||
|
### Select Server Configuration
|
||||||
|
|
||||||
|
For using other server than the one defined on index 0 set context value `api.ContextServerIndex` of type `int`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
ctx := context.WithValue(context.Background(), api.ContextServerIndex, 1)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Templated Server URL
|
||||||
|
|
||||||
|
Templated server URL is formatted using default variables from configuration or from context value `api.ContextServerVariables` of type `map[string]string`.
|
||||||
|
|
||||||
|
```go
|
||||||
|
ctx := context.WithValue(context.Background(), api.ContextServerVariables, map[string]string{
|
||||||
|
"basePath": "v2",
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
Note, enum values are always validated and all unused variables are silently ignored.
|
||||||
|
|
||||||
|
### URLs Configuration per Operation
|
||||||
|
|
||||||
|
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||||
|
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
|
||||||
|
Similar rules for overriding default operation server index and variables applies by using `api.ContextOperationServerIndices` and `api.ContextOperationServerVariables` context maps.
|
||||||
|
|
||||||
|
```go
|
||||||
|
ctx := context.WithValue(context.Background(), api.ContextOperationServerIndices, map[string]int{
|
||||||
|
"{classname}Service.{nickname}": 2,
|
||||||
|
})
|
||||||
|
ctx = context.WithValue(context.Background(), api.ContextOperationServerVariables, map[string]map[string]string{
|
||||||
|
"{classname}Service.{nickname}": {
|
||||||
|
"port": "8443",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Class | Method | HTTP request | Description
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*AnalyticsAPI* | [**ContextMetrics**](docs/AnalyticsAPI.md#contextmetrics) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetrics | Get context metrics for a specific gamePk.
|
||||||
|
*AnalyticsAPI* | [**ContextMetricsWithAverages**](docs/AnalyticsAPI.md#contextmetricswithaverages) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
*AnalyticsAPI* | [**ContextMetricsWithAveragesPost**](docs/AnalyticsAPI.md#contextmetricswithaveragespost) | **Post** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
*AnalyticsAPI* | [**GameGuids**](docs/AnalyticsAPI.md#gameguids) | **Get** /api/v1/game/{gamePk}/guids | Get the GUIDs (plays) for a specific game.
|
||||||
|
*AnalyticsAPI* | [**GameGuidsFromPostgresRange**](docs/AnalyticsAPI.md#gameguidsfrompostgresrange) | **Get** /api/v1/analytics/guids | Get the GUIDs (plays) for a specific game.
|
||||||
|
*AnalyticsAPI* | [**GameGuidsFromPostgresRangeByGame**](docs/AnalyticsAPI.md#gameguidsfrompostgresrangebygame) | **Get** /api/v1/analytics/game | Get all games by updated date.
|
||||||
|
*AnalyticsAPI* | [**GameLastPitch**](docs/AnalyticsAPI.md#gamelastpitch) | **Get** /api/v1/game/lastPitch | Get the last pitch for a list of games
|
||||||
|
*AnalyticsAPI* | [**HomeRunBallparks**](docs/AnalyticsAPI.md#homerunballparks) | **Get** /api/v1/game/{gamePk}/{guid}/homeRunBallparks | Get if the play is a home run is each park for a specific play.
|
||||||
|
*AnalyticsAPI* | [**ParsedJsonFormattedAnalytics**](docs/AnalyticsAPI.md#parsedjsonformattedanalytics) | **Get** /api/v1/game/{gamePk}/{guid}/analytics | Get Statcast data for a specific play.
|
||||||
|
*AttendanceAPI* | [**GetTeamAttendance**](docs/AttendanceAPI.md#getteamattendance) | **Get** /api/v1/attendance | Get team attendance
|
||||||
|
*AwardsAPI* | [**AwardRecipients**](docs/AwardsAPI.md#awardrecipients) | **Get** /api/v1/awards/{awardId}/recipients | View recipients of an award
|
||||||
|
*AwardsAPI* | [**Awards**](docs/AwardsAPI.md#awards) | **Get** /api/v1/awards | View awards info
|
||||||
|
*AwardsAPI* | [**Awards1**](docs/AwardsAPI.md#awards1) | **Get** /api/v1/awards/{awardId} | View awards info
|
||||||
|
*BatTrackingAPI* | [**BatTracking**](docs/BatTrackingAPI.md#battracking) | **Get** /api/v1/batTracking/game/{gamePk}/{playId} | View Bat Tracking Data by playId and gameId
|
||||||
|
*BiomechanicsAPI* | [**Biomechanical**](docs/BiomechanicsAPI.md#biomechanical) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/biomechanics/{positionId} | View Biomechanical data by playId and gameId filtered by player positionId
|
||||||
|
*BroadcastAPI* | [**GetAllBroadcasters**](docs/BroadcastAPI.md#getallbroadcasters) | **Get** /api/v1/broadcasters | Get All Active Broadcasters
|
||||||
|
*BroadcastAPI* | [**GetBroadcasts**](docs/BroadcastAPI.md#getbroadcasts) | **Get** /api/v1/broadcast | Get Broadcasters
|
||||||
|
*ConferenceAPI* | [**Conferences**](docs/ConferenceAPI.md#conferences) | **Get** /api/v1/conferences | View conference info
|
||||||
|
*ConferenceAPI* | [**Conferences1**](docs/ConferenceAPI.md#conferences1) | **Get** /api/v1/conferences/{conferenceId} | View conference info
|
||||||
|
*DivisionAPI* | [**Divisions**](docs/DivisionAPI.md#divisions) | **Get** /api/v1/divisions | Get division information
|
||||||
|
*DivisionAPI* | [**Divisions1**](docs/DivisionAPI.md#divisions1) | **Get** /api/v1/divisions/{divisionId} | Get division information
|
||||||
|
*DraftAPI* | [**DraftPicks**](docs/DraftAPI.md#draftpicks) | **Get** /api/v1/draft | View MLB Drafted Players
|
||||||
|
*DraftAPI* | [**DraftPicks1**](docs/DraftAPI.md#draftpicks1) | **Get** /api/v1/draft/{year} | View MLB Drafted Players
|
||||||
|
*DraftAPI* | [**DraftProspects**](docs/DraftAPI.md#draftprospects) | **Get** /api/v1/draft/prospects | View MLB Draft Prospects
|
||||||
|
*DraftAPI* | [**DraftProspects1**](docs/DraftAPI.md#draftprospects1) | **Get** /api/v1/draft/prospects/{year} | View MLB Draft Prospects
|
||||||
|
*DraftAPI* | [**LatestDraftPicks**](docs/DraftAPI.md#latestdraftpicks) | **Get** /api/v1/draft/{year}/latest | Get the last drafted player and the next 5 teams up to pick
|
||||||
|
*GameAPI* | [**Boxscore**](docs/GameAPI.md#boxscore) | **Get** /api/v1/game/{game_pk}/boxscore | Get game boxscore.
|
||||||
|
*GameAPI* | [**ColorFeed**](docs/GameAPI.md#colorfeed) | **Get** /api/v1/game/{game_pk}/feed/color | Get game color feed.
|
||||||
|
*GameAPI* | [**ColorTimestamps**](docs/GameAPI.md#colortimestamps) | **Get** /api/v1/game/{game_pk}/feed/color/timestamps | Retrieve all of the color timestamps for a game.
|
||||||
|
*GameAPI* | [**Content**](docs/GameAPI.md#content) | **Get** /api/v1/game/{game_pk}/content | Retrieve all content for a game.
|
||||||
|
*GameAPI* | [**CurrentGameStats1**](docs/GameAPI.md#currentgamestats1) | **Get** /api/v1/game/changes | View a game change log
|
||||||
|
*GameAPI* | [**GetGameContextMetrics**](docs/GameAPI.md#getgamecontextmetrics) | **Get** /api/v1/game/{gamePk}/contextMetrics | Get the context metrics for this game based on its current state
|
||||||
|
*GameAPI* | [**GetGameWithMetrics**](docs/GameAPI.md#getgamewithmetrics) | **Get** /api/v1/game/{gamePk}/withMetrics | Get game info with metrics
|
||||||
|
*GameAPI* | [**GetWinProbability**](docs/GameAPI.md#getwinprobability) | **Get** /api/v1/game/{gamePk}/winProbability | Get the win probability for this game
|
||||||
|
*GameAPI* | [**Linescore**](docs/GameAPI.md#linescore) | **Get** /api/v1/game/{game_pk}/linescore | Get game linescore
|
||||||
|
*GameAPI* | [**LiveGameDiffPatchV1**](docs/GameAPI.md#livegamediffpatchv1) | **Get** /api/v1.1/game/{game_pk}/feed/live/diffPatch | Get live game status diffPatch.
|
||||||
|
*GameAPI* | [**LiveGameV1**](docs/GameAPI.md#livegamev1) | **Get** /api/v1.1/game/{game_pk}/feed/live | Get live game status.
|
||||||
|
*GameAPI* | [**LiveTimestampv11**](docs/GameAPI.md#livetimestampv11) | **Get** /api/v1.1/game/{game_pk}/feed/live/timestamps | Retrieve all of the play timestamps for a game.
|
||||||
|
*GameAPI* | [**PlayByPlay**](docs/GameAPI.md#playbyplay) | **Get** /api/v1/game/{game_pk}/playByPlay | Get game play By Play
|
||||||
|
*GamePaceAPI* | [**GamePace**](docs/GamePaceAPI.md#gamepace) | **Get** /api/v1/gamePace | View time of game info
|
||||||
|
*HighLowAPI* | [**HighLow**](docs/HighLowAPI.md#highlow) | **Get** /api/v1/highLow/{highLowType} | View high/low stats by player or team
|
||||||
|
*HighLowAPI* | [**HighLowStats**](docs/HighLowAPI.md#highlowstats) | **Get** /api/v1/highLow/types | View high/low stat types
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyBracket**](docs/HomerunDerbyAPI.md#homerunderbybracket) | **Get** /api/v1/homeRunDerby/{gamePk} | View a home run derby object
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyBracket1**](docs/HomerunDerbyAPI.md#homerunderbybracket1) | **Get** /api/v1/homeRunDerby | View a home run derby object
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyBracket2**](docs/HomerunDerbyAPI.md#homerunderbybracket2) | **Get** /api/v1/homeRunDerby/{gamePk}/bracket | View a home run derby object
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyBracket3**](docs/HomerunDerbyAPI.md#homerunderbybracket3) | **Get** /api/v1/homeRunDerby/bracket | View a home run derby object
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyMixedMode**](docs/HomerunDerbyAPI.md#homerunderbymixedmode) | **Get** /api/v1/homeRunDerby/{gamePk}/mixed | View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyMixedMode1**](docs/HomerunDerbyAPI.md#homerunderbymixedmode1) | **Get** /api/v1/homeRunDerby/mixed | View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyPool**](docs/HomerunDerbyAPI.md#homerunderbypool) | **Get** /api/v1/homeRunDerby/{gamePk}/pool | View home run derby pool
|
||||||
|
*HomerunDerbyAPI* | [**HomeRunDerbyPool1**](docs/HomerunDerbyAPI.md#homerunderbypool1) | **Get** /api/v1/homeRunDerby/pool | View home run derby pool
|
||||||
|
*JobAPI* | [**Datacasters**](docs/JobAPI.md#datacasters) | **Get** /api/v1/jobs/datacasters | Get datacaster jobs
|
||||||
|
*JobAPI* | [**GetJobsByType**](docs/JobAPI.md#getjobsbytype) | **Get** /api/v1/jobs | Get jobs by type
|
||||||
|
*JobAPI* | [**OfficialScorers**](docs/JobAPI.md#officialscorers) | **Get** /api/v1/jobs/officialScorers | Get official scorers
|
||||||
|
*JobAPI* | [**UmpireSchedule**](docs/JobAPI.md#umpireschedule) | **Get** /api/v1/jobs/umpires/games/{umpireId} | Get umpires and associated game for umpireId
|
||||||
|
*JobAPI* | [**Umpires**](docs/JobAPI.md#umpires) | **Get** /api/v1/jobs/umpires | Get umpires
|
||||||
|
*LeagueAPI* | [**AllStarBallot**](docs/LeagueAPI.md#allstarballot) | **Get** /api/v1/league/allStarBallot | View al star ballot info
|
||||||
|
*LeagueAPI* | [**AllStarBallot1**](docs/LeagueAPI.md#allstarballot1) | **Get** /api/v1/league/{leagueId}/allStarBallot | View al star ballot info
|
||||||
|
*LeagueAPI* | [**AllStarBallot2**](docs/LeagueAPI.md#allstarballot2) | **Get** /api/v1/leagues/allStarBallot | View al star ballot info
|
||||||
|
*LeagueAPI* | [**AllStarBallot3**](docs/LeagueAPI.md#allstarballot3) | **Get** /api/v1/leagues/{leagueId}/allStarBallot | View al star ballot info
|
||||||
|
*LeagueAPI* | [**AllStarFinalVote**](docs/LeagueAPI.md#allstarfinalvote) | **Get** /api/v1/league/{leagueId}/allStarFinalVote | View all star final vote info
|
||||||
|
*LeagueAPI* | [**AllStarFinalVote1**](docs/LeagueAPI.md#allstarfinalvote1) | **Get** /api/v1/leagues/{leagueId}/allStarFinalVote | View all star final vote info
|
||||||
|
*LeagueAPI* | [**AllStarWriteIns**](docs/LeagueAPI.md#allstarwriteins) | **Get** /api/v1/league/{leagueId}/allStarWriteIns | View all star write ins info
|
||||||
|
*LeagueAPI* | [**AllStarWriteIns1**](docs/LeagueAPI.md#allstarwriteins1) | **Get** /api/v1/leagues/{leagueId}/allStarWriteIns | View all star write ins info
|
||||||
|
*LeagueAPI* | [**League**](docs/LeagueAPI.md#league) | **Get** /api/v1/league | View league info
|
||||||
|
*LeagueAPI* | [**League1**](docs/LeagueAPI.md#league1) | **Get** /api/v1/league/{leagueId} | View league info
|
||||||
|
*LeagueAPI* | [**League2**](docs/LeagueAPI.md#league2) | **Get** /api/v1/leagues | View league info
|
||||||
|
*LeagueAPI* | [**League3**](docs/LeagueAPI.md#league3) | **Get** /api/v1/leagues/{leagueId} | View league info
|
||||||
|
*MilestonesAPI* | [**AchievementStatuses**](docs/MilestonesAPI.md#achievementstatuses) | **Get** /api/v1/achievementStatuses | View available achievementStatus options
|
||||||
|
*MilestonesAPI* | [**MilestoneDurations**](docs/MilestonesAPI.md#milestonedurations) | **Get** /api/v1/milestoneDurations | View available milestoneDurations options
|
||||||
|
*MilestonesAPI* | [**MilestoneLookups**](docs/MilestonesAPI.md#milestonelookups) | **Get** /api/v1/milestoneLookups | View available milestoneLookup options
|
||||||
|
*MilestonesAPI* | [**MilestoneStatistics**](docs/MilestonesAPI.md#milestonestatistics) | **Get** /api/v1/milestoneStatistics | View available milestone statistics options
|
||||||
|
*MilestonesAPI* | [**MilestoneTypes**](docs/MilestonesAPI.md#milestonetypes) | **Get** /api/v1/milestoneTypes | View available milestoneType options
|
||||||
|
*MilestonesAPI* | [**Milestones**](docs/MilestonesAPI.md#milestones) | **Get** /api/v1/milestones | View pending and achieved milestones.
|
||||||
|
*MiscAPI* | [**AggregateSortEnum**](docs/MiscAPI.md#aggregatesortenum) | **Get** /api/v1/sortModifiers | List all stat fields
|
||||||
|
*MiscAPI* | [**BaseballStats**](docs/MiscAPI.md#baseballstats) | **Get** /api/v1/baseballStats | List all baseball stats
|
||||||
|
*MiscAPI* | [**BroadcastAvailabilityTypes**](docs/MiscAPI.md#broadcastavailabilitytypes) | **Get** /api/v1/broadcastAvailability | View broadcast availability options
|
||||||
|
*MiscAPI* | [**CoachingVideoTypes**](docs/MiscAPI.md#coachingvideotypes) | **Get** /api/v1/coachingVideoTypes | List all coaching video types
|
||||||
|
*MiscAPI* | [**EventStatus**](docs/MiscAPI.md#eventstatus) | **Get** /api/v1/eventStatus | List all possible event status types
|
||||||
|
*MiscAPI* | [**EventTypes**](docs/MiscAPI.md#eventtypes) | **Get** /api/v1/eventTypes | List all event types
|
||||||
|
*MiscAPI* | [**FielderDetailTypes**](docs/MiscAPI.md#fielderdetailtypes) | **Get** /api/v1/fielderDetailTypes | List fielder detail types
|
||||||
|
*MiscAPI* | [**FreeGameTypes**](docs/MiscAPI.md#freegametypes) | **Get** /api/v1/freeGameTypes | View free game types
|
||||||
|
*MiscAPI* | [**GameStatus**](docs/MiscAPI.md#gamestatus) | **Get** /api/v1/gameStatus | List all status types
|
||||||
|
*MiscAPI* | [**GameTypes**](docs/MiscAPI.md#gametypes) | **Get** /api/v1/gameTypes | List all game types
|
||||||
|
*MiscAPI* | [**GamedayTypes**](docs/MiscAPI.md#gamedaytypes) | **Get** /api/v1/gamedayTypes | List all gameday types
|
||||||
|
*MiscAPI* | [**GetLookupValues**](docs/MiscAPI.md#getlookupvalues) | **Get** /api/v1/lookup/values/all | View all lookup values
|
||||||
|
*MiscAPI* | [**GroupByTypes**](docs/MiscAPI.md#groupbytypes) | **Get** /api/v1/groupByTypes | List groupBy types
|
||||||
|
*MiscAPI* | [**HitTrajectories**](docs/MiscAPI.md#hittrajectories) | **Get** /api/v1/hitTrajectories | List all hit trajectories
|
||||||
|
*MiscAPI* | [**JobTypes**](docs/MiscAPI.md#jobtypes) | **Get** /api/v1/jobTypes | List all job types
|
||||||
|
*MiscAPI* | [**Languages**](docs/MiscAPI.md#languages) | **Get** /api/v1/languages | List all support languages
|
||||||
|
*MiscAPI* | [**LeagueLeaderTypes**](docs/MiscAPI.md#leagueleadertypes) | **Get** /api/v1/leagueLeaderTypes | List all possible player league leader types
|
||||||
|
*MiscAPI* | [**LogicalEvents**](docs/MiscAPI.md#logicalevents) | **Get** /api/v1/logicalEvents | List all logical event types
|
||||||
|
*MiscAPI* | [**MediaStateTypes**](docs/MiscAPI.md#mediastatetypes) | **Get** /api/v1/mediaState | View media state options
|
||||||
|
*MiscAPI* | [**Metrics**](docs/MiscAPI.md#metrics) | **Get** /api/v1/metrics | List all possible metrics
|
||||||
|
*MiscAPI* | [**MoundVisitTypes**](docs/MiscAPI.md#moundvisittypes) | **Get** /api/v1/moundVisitTypes | List all mound visit types
|
||||||
|
*MiscAPI* | [**PerformerTypes**](docs/MiscAPI.md#performertypes) | **Get** /api/v1/performerTypes | List all possible performer types
|
||||||
|
*MiscAPI* | [**PitchCodes**](docs/MiscAPI.md#pitchcodes) | **Get** /api/v1/pitchCodes | List all pitch codes
|
||||||
|
*MiscAPI* | [**PitchTypes**](docs/MiscAPI.md#pitchtypes) | **Get** /api/v1/pitchTypes | List all pitch classification types
|
||||||
|
*MiscAPI* | [**Platforms**](docs/MiscAPI.md#platforms) | **Get** /api/v1/platforms | List all possible platforms
|
||||||
|
*MiscAPI* | [**PlayerStatusCodes**](docs/MiscAPI.md#playerstatuscodes) | **Get** /api/v1/playerStatusCodes | List all player status codes
|
||||||
|
*MiscAPI* | [**Positions**](docs/MiscAPI.md#positions) | **Get** /api/v1/positions | List all possible positions
|
||||||
|
*MiscAPI* | [**ReviewReasons**](docs/MiscAPI.md#reviewreasons) | **Get** /api/v1/reviewReasons | List all replay review reasons
|
||||||
|
*MiscAPI* | [**RoofTypes**](docs/MiscAPI.md#rooftypes) | **Get** /api/v1/roofTypes | List all roof types
|
||||||
|
*MiscAPI* | [**RosterTypes**](docs/MiscAPI.md#rostertypes) | **Get** /api/v1/rosterTypes | List all possible roster types
|
||||||
|
*MiscAPI* | [**RuleSettings**](docs/MiscAPI.md#rulesettings) | **Get** /api/v1/ruleSettings | List all ruleSettings
|
||||||
|
*MiscAPI* | [**RunnerDetailTypes**](docs/MiscAPI.md#runnerdetailtypes) | **Get** /api/v1/runnerDetailTypes | List runner detail types
|
||||||
|
*MiscAPI* | [**ScheduleEventTypes**](docs/MiscAPI.md#scheduleeventtypes) | **Get** /api/v1/scheduleEventTypes | List all schedule event types
|
||||||
|
*MiscAPI* | [**ScheduleTypes**](docs/MiscAPI.md#scheduletypes) | **Get** /api/v1/scheduleTypes | List all possible schedule types
|
||||||
|
*MiscAPI* | [**SitCodes**](docs/MiscAPI.md#sitcodes) | **Get** /api/v1/situationCodes | List all situation codes
|
||||||
|
*MiscAPI* | [**Sky**](docs/MiscAPI.md#sky) | **Get** /api/v1/sky | List all sky options
|
||||||
|
*MiscAPI* | [**StandingsTypes**](docs/MiscAPI.md#standingstypes) | **Get** /api/v1/standingsTypes | List all standings types
|
||||||
|
*MiscAPI* | [**StatFields**](docs/MiscAPI.md#statfields) | **Get** /api/v1/statFields | List all stat fields
|
||||||
|
*MiscAPI* | [**StatGroups**](docs/MiscAPI.md#statgroups) | **Get** /api/v1/statGroups | List all stat groups
|
||||||
|
*MiscAPI* | [**StatSearchConfig**](docs/MiscAPI.md#statsearchconfig) | **Get** /api/v1/stats/search/config | Stats Search Config Endpoint
|
||||||
|
*MiscAPI* | [**StatSearchGroupByTypes**](docs/MiscAPI.md#statsearchgroupbytypes) | **Get** /api/v1/stats/search/groupByTypes | List groupBy types
|
||||||
|
*MiscAPI* | [**StatSearchParams**](docs/MiscAPI.md#statsearchparams) | **Get** /api/v1/stats/search/params | List stat search parameters
|
||||||
|
*MiscAPI* | [**StatSearchStats**](docs/MiscAPI.md#statsearchstats) | **Get** /api/v1/stats/search/stats | List stat search stats
|
||||||
|
*MiscAPI* | [**StatTypes**](docs/MiscAPI.md#stattypes) | **Get** /api/v1/statTypes | List all stat types
|
||||||
|
*MiscAPI* | [**StatcastPositionTypes**](docs/MiscAPI.md#statcastpositiontypes) | **Get** /api/v1/statcastPositionTypes | List all statcast position types
|
||||||
|
*MiscAPI* | [**TrackingSoftwareVersions**](docs/MiscAPI.md#trackingsoftwareversions) | **Get** /api/v1/trackingSoftwareVersions | List the tracking software versions and notes
|
||||||
|
*MiscAPI* | [**TrackingSystemOwners**](docs/MiscAPI.md#trackingsystemowners) | **Get** /api/v1/trackingSystemOwners | List all tracking system owners
|
||||||
|
*MiscAPI* | [**TrackingVendors**](docs/MiscAPI.md#trackingvendors) | **Get** /api/v1/trackingVendors | List all tracking vendors
|
||||||
|
*MiscAPI* | [**TrackingVersions**](docs/MiscAPI.md#trackingversions) | **Get** /api/v1/trackingVersions | List all tracking versions
|
||||||
|
*MiscAPI* | [**TransactionTypes**](docs/MiscAPI.md#transactiontypes) | **Get** /api/v1/transactionTypes | List all transaction types
|
||||||
|
*MiscAPI* | [**UpdateGameStatuses**](docs/MiscAPI.md#updategamestatuses) | **Post** /api/v1/gameStatus | Clear all status types
|
||||||
|
*MiscAPI* | [**UpdateJobTypes**](docs/MiscAPI.md#updatejobtypes) | **Post** /api/v1/jobTypes |
|
||||||
|
*MiscAPI* | [**VideoResolutionTypes**](docs/MiscAPI.md#videoresolutiontypes) | **Get** /api/v1/videoResolutionTypes | View video resolution options
|
||||||
|
*MiscAPI* | [**ViolationTypes**](docs/MiscAPI.md#violationtypes) | **Get** /api/v1/violationTypes | View available violationType options
|
||||||
|
*MiscAPI* | [**WeatherTrajectoryConfidences**](docs/MiscAPI.md#weathertrajectoryconfidences) | **Get** /api/v1/weatherTrajectoryConfidences | List all weather trajectories
|
||||||
|
*MiscAPI* | [**WindDirection**](docs/MiscAPI.md#winddirection) | **Get** /api/v1/windDirection | List all wind direction options
|
||||||
|
*PersonAPI* | [**Award**](docs/PersonAPI.md#award) | **Get** /api/v1/people/{personId}/awards | View a player's awards
|
||||||
|
*PersonAPI* | [**CurrentGameStats**](docs/PersonAPI.md#currentgamestats) | **Get** /api/v1/people/changes | View a player's change log
|
||||||
|
*PersonAPI* | [**FreeAgents**](docs/PersonAPI.md#freeagents) | **Get** /api/v1/people/freeAgents | Get free agents
|
||||||
|
*PersonAPI* | [**Person**](docs/PersonAPI.md#person) | **Get** /api/v1/people/{personId} | View a player
|
||||||
|
*PersonAPI* | [**Person1**](docs/PersonAPI.md#person1) | **Get** /api/v1/people | View a player
|
||||||
|
*PersonAPI* | [**PlayerGameStats**](docs/PersonAPI.md#playergamestats) | **Get** /api/v1/people/{personId}/stats/game/{gamePk} | View a player's game stats
|
||||||
|
*PersonAPI* | [**Search**](docs/PersonAPI.md#search) | **Get** /api/v1/people/search | Search for a player by name
|
||||||
|
*PersonAPI* | [**Stats3**](docs/PersonAPI.md#stats3) | **Get** /api/v1/people/{personId}/stats | View a players stats
|
||||||
|
*PersonAPI* | [**StatsMetrics**](docs/PersonAPI.md#statsmetrics) | **Get** /api/v1/people/{personId}/stats/metrics | View a player's stat metrics
|
||||||
|
*PredictionsAPI* | [**GetProps**](docs/PredictionsAPI.md#getprops) | **Get** /api/v1/props/play/predictions | Get play-level predictions based on input scenarios
|
||||||
|
*PredictionsAPI* | [**GetPropsAdjust**](docs/PredictionsAPI.md#getpropsadjust) | **Get** /api/v1/props/play/predictions/adjust | Get play-level predictions based on input scenarios
|
||||||
|
*ReviewsAPI* | [**GetReviewInfo**](docs/ReviewsAPI.md#getreviewinfo) | **Get** /api/v1/review | Get review info
|
||||||
|
*ScheduleAPI* | [**PostseasonSchedule**](docs/ScheduleAPI.md#postseasonschedule) | **Get** /api/v1/schedule/postseason | Get postseason schedule
|
||||||
|
*ScheduleAPI* | [**PostseasonScheduleSeries**](docs/ScheduleAPI.md#postseasonscheduleseries) | **Get** /api/v1/schedule/postseason/series | Get postseason series schedules
|
||||||
|
*ScheduleAPI* | [**Schedule**](docs/ScheduleAPI.md#schedule) | **Get** /api/v1/schedule | View schedule info based on scheduleType.
|
||||||
|
*ScheduleAPI* | [**Schedule1**](docs/ScheduleAPI.md#schedule1) | **Get** /api/v1/schedule/{scheduleType} | View schedule info based on scheduleType.
|
||||||
|
*ScheduleAPI* | [**TieGames**](docs/ScheduleAPI.md#tiegames) | **Get** /api/v1/schedule/games/tied | Get tied game schedules
|
||||||
|
*ScheduleAPI* | [**TrackingEventsSchedule**](docs/ScheduleAPI.md#trackingeventsschedule) | **Get** /api/v1/schedule/trackingEvents | Get tracking event schedules
|
||||||
|
*ScheduleAPI* | [**TuneIn**](docs/ScheduleAPI.md#tunein) | **Get** /api/v1/schedule/postseason/tuneIn | Get postseason TuneIn schedules
|
||||||
|
*SeasonAPI* | [**AllSeasons**](docs/SeasonAPI.md#allseasons) | **Get** /api/v1/seasons/all | View all seasons
|
||||||
|
*SeasonAPI* | [**Seasons**](docs/SeasonAPI.md#seasons) | **Get** /api/v1/seasons | View season info
|
||||||
|
*SeasonAPI* | [**Seasons1**](docs/SeasonAPI.md#seasons1) | **Get** /api/v1/seasons/{seasonId} | View season info
|
||||||
|
*SkeletalAPI* | [**SkeletalChunked**](docs/SkeletalAPI.md#skeletalchunked) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/skeletalData/chunked | View Skeletal Data by playId and gameId chunked
|
||||||
|
*SkeletalAPI* | [**SkeletalDataFileNames**](docs/SkeletalAPI.md#skeletaldatafilenames) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/skeletalData/files | View Skeletal Data by playId and gameId files
|
||||||
|
*SportsAPI* | [**AllSportBallot**](docs/SportsAPI.md#allsportballot) | **Get** /api/v1/sports/{sportId}/allSportBallot | Get ALL MLB ballot for sport
|
||||||
|
*SportsAPI* | [**SportPlayers**](docs/SportsAPI.md#sportplayers) | **Get** /api/v1/sports/{sportId}/players | Get all players for a sport level
|
||||||
|
*SportsAPI* | [**Sports**](docs/SportsAPI.md#sports) | **Get** /api/v1/sports | Get sports information
|
||||||
|
*SportsAPI* | [**Sports1**](docs/SportsAPI.md#sports1) | **Get** /api/v1/sports/{sportId} | Get sports information
|
||||||
|
*StandingsAPI* | [**Standings**](docs/StandingsAPI.md#standings) | **Get** /api/v1/standings/{standingsType} | View standings for a league
|
||||||
|
*StandingsAPI* | [**Standings1**](docs/StandingsAPI.md#standings1) | **Get** /api/v1/standings | View standings for a league
|
||||||
|
*StatsAPI* | [**BeastStats**](docs/StatsAPI.md#beaststats) | **Get** /api/v1/stats/search | View stats from search
|
||||||
|
*StatsAPI* | [**GetOutsAboveAverage**](docs/StatsAPI.md#getoutsaboveaverage) | **Get** /api/v1/stats/analytics/outsAboveAverage | Get outs above average for the current batter
|
||||||
|
*StatsAPI* | [**GetSprayChart**](docs/StatsAPI.md#getspraychart) | **Get** /api/v1/stats/analytics/sprayChart | Get the spray chart info for the current batter
|
||||||
|
*StatsAPI* | [**GetStolenBaseProbability**](docs/StatsAPI.md#getstolenbaseprobability) | **Get** /api/v1/stats/analytics/stolenBaseProbability | Get the probability of a hit for the given hit data
|
||||||
|
*StatsAPI* | [**GroupedStats**](docs/StatsAPI.md#groupedstats) | **Get** /api/v1/stats/grouped | View grouped stats
|
||||||
|
*StatsAPI* | [**Leaders2**](docs/StatsAPI.md#leaders2) | **Get** /api/v1/stats/leaders | Get leaders for a statistic
|
||||||
|
*StatsAPI* | [**MetricStats**](docs/StatsAPI.md#metricstats) | **Get** /api/v1/stats/metrics | View metric stats
|
||||||
|
*StatsAPI* | [**Stats2**](docs/StatsAPI.md#stats2) | **Get** /api/v1/stats | View stats
|
||||||
|
*StreaksAPI* | [**GetStreaks**](docs/StreaksAPI.md#getstreaks) | **Get** /api/v1/streaks | View streaks
|
||||||
|
*StreaksAPI* | [**StreakTypes**](docs/StreaksAPI.md#streaktypes) | **Get** /api/v1/streaks/types | View streaks parameter options
|
||||||
|
*TeamsAPI* | [**Affiliates**](docs/TeamsAPI.md#affiliates) | **Get** /api/v1/teams/{teamId}/affiliates | View team and affiliate teams
|
||||||
|
*TeamsAPI* | [**Affiliates1**](docs/TeamsAPI.md#affiliates1) | **Get** /api/v1/teams/affiliates | View team and affiliate teams
|
||||||
|
*TeamsAPI* | [**AllTeams**](docs/TeamsAPI.md#allteams) | **Get** /api/v1/teams/{teamId}/history | View historical records for a list of teams
|
||||||
|
*TeamsAPI* | [**AllTeams1**](docs/TeamsAPI.md#allteams1) | **Get** /api/v1/teams/history | View historical records for a list of teams
|
||||||
|
*TeamsAPI* | [**Alumni**](docs/TeamsAPI.md#alumni) | **Get** /api/v1/teams/{teamId}/alumni | View all team alumni
|
||||||
|
*TeamsAPI* | [**Coaches**](docs/TeamsAPI.md#coaches) | **Get** /api/v1/teams/{teamId}/coaches | View all coaches for a team
|
||||||
|
*TeamsAPI* | [**Leaders**](docs/TeamsAPI.md#leaders) | **Get** /api/v1/teams/{teamId}/leaders | View team stat leaders
|
||||||
|
*TeamsAPI* | [**Leaders1**](docs/TeamsAPI.md#leaders1) | **Get** /api/v1/teams/stats/leaders | View leaders for team stats
|
||||||
|
*TeamsAPI* | [**Personnel**](docs/TeamsAPI.md#personnel) | **Get** /api/v1/teams/{teamId}/personnel | View all coaches for a team
|
||||||
|
*TeamsAPI* | [**Roster**](docs/TeamsAPI.md#roster) | **Get** /api/v1/teams/{teamId}/roster | View a teams roster
|
||||||
|
*TeamsAPI* | [**Roster1**](docs/TeamsAPI.md#roster1) | **Get** /api/v1/teams/{teamId}/roster/{rosterType} | View a teams roster
|
||||||
|
*TeamsAPI* | [**Stats**](docs/TeamsAPI.md#stats) | **Get** /api/v1/teams/{teamId}/stats | View a teams stats
|
||||||
|
*TeamsAPI* | [**Stats1**](docs/TeamsAPI.md#stats1) | **Get** /api/v1/teams/stats | View a teams stats
|
||||||
|
*TeamsAPI* | [**Teams**](docs/TeamsAPI.md#teams) | **Get** /api/v1/teams | View info for all teams
|
||||||
|
*TeamsAPI* | [**Teams1**](docs/TeamsAPI.md#teams1) | **Get** /api/v1/teams/{teamId} | View info for all teams
|
||||||
|
*TeamsAPI* | [**UpdateAlumni**](docs/TeamsAPI.md#updatealumni) | **Post** /api/v1/teams/{teamId}/alumni |
|
||||||
|
*TransactionsAPI* | [**Transactions**](docs/TransactionsAPI.md#transactions) | **Get** /api/v1/transactions | View transaction info
|
||||||
|
*UniformsAPI* | [**UniformsByGame**](docs/UniformsAPI.md#uniformsbygame) | **Get** /api/v1/uniforms/game | View Game Uniform info
|
||||||
|
*UniformsAPI* | [**UniformsByTeam**](docs/UniformsAPI.md#uniformsbyteam) | **Get** /api/v1/uniforms/team | View Team Uniform info
|
||||||
|
*VenuesAPI* | [**Venues**](docs/VenuesAPI.md#venues) | **Get** /api/v1/venues | View venue info
|
||||||
|
*VenuesAPI* | [**Venues1**](docs/VenuesAPI.md#venues1) | **Get** /api/v1/venues/{venueId} | View venue info
|
||||||
|
*WeatherAPI* | [**WeatherBasic**](docs/WeatherAPI.md#weatherbasic) | **Get** /api/v1/weather/venues/{venueId}/basic | Get basic weather for a venue.
|
||||||
|
*WeatherAPI* | [**WeatherDataBasedOnPlay**](docs/WeatherAPI.md#weatherdatabasedonplay) | **Get** /api/v1/weather/game/{gamePk}/{playId} | Get the raw field weather data.
|
||||||
|
*WeatherAPI* | [**WeatherForecast**](docs/WeatherAPI.md#weatherforecast) | **Get** /api/v1/weather/game/{gamePk}/forecast/{roofType} | Get the weather forecast for a game.
|
||||||
|
*WeatherAPI* | [**WeatherFull**](docs/WeatherAPI.md#weatherfull) | **Get** /api/v1/weather/venues/{venueId}/full | Get full weather for a venue.
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation For Models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
Endpoints do not require authorization.
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation for Utility Methods
|
||||||
|
|
||||||
|
Due to the fact that model structure members are all pointers, this package contains
|
||||||
|
a number of utility functions to easily obtain pointers to values of basic types.
|
||||||
|
Each of these functions takes a value of the given basic type and returns a pointer to it:
|
||||||
|
|
||||||
|
* `PtrBool`
|
||||||
|
* `PtrInt`
|
||||||
|
* `PtrInt32`
|
||||||
|
* `PtrInt64`
|
||||||
|
* `PtrFloat`
|
||||||
|
* `PtrFloat32`
|
||||||
|
* `PtrFloat64`
|
||||||
|
* `PtrString`
|
||||||
|
* `PtrTime`
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,213 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AttendanceAPIService AttendanceAPI service
|
||||||
|
type AttendanceAPIService service
|
||||||
|
|
||||||
|
type ApiGetTeamAttendanceRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *AttendanceAPIService
|
||||||
|
teamId *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
leagueListId *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
date *interface{}
|
||||||
|
startDate *interface{}
|
||||||
|
endDate *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiGetTeamAttendanceRequest) TeamId(teamId interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiGetTeamAttendanceRequest) LeagueId(leagueId interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiGetTeamAttendanceRequest) Season(season interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League List Identifier
|
||||||
|
func (r ApiGetTeamAttendanceRequest) LeagueListId(leagueListId interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.leagueListId = &leagueListId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiGetTeamAttendanceRequest) GameType(gameType interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiGetTeamAttendanceRequest) Date(date interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start date for range of data (must be used with end date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiGetTeamAttendanceRequest) StartDate(startDate interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.startDate = &startDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// End date for range of data (must be used with start date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiGetTeamAttendanceRequest) EndDate(endDate interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.endDate = &endDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetTeamAttendanceRequest) Fields(fields interface{}) ApiGetTeamAttendanceRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetTeamAttendanceRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetTeamAttendanceExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetTeamAttendance Get team attendance
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetTeamAttendanceRequest
|
||||||
|
*/
|
||||||
|
func (a *AttendanceAPIService) GetTeamAttendance(ctx context.Context) ApiGetTeamAttendanceRequest {
|
||||||
|
return ApiGetTeamAttendanceRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *AttendanceAPIService) GetTeamAttendanceExecute(r ApiGetTeamAttendanceRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AttendanceAPIService.GetTeamAttendance")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/attendance"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueListId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueListId", r.leagueListId, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.startDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "startDate", r.startDate, "", "")
|
||||||
|
}
|
||||||
|
if r.endDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "endDate", r.endDate, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,387 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AwardsAPIService AwardsAPI service
|
||||||
|
type AwardsAPIService service
|
||||||
|
|
||||||
|
type ApiAwardRecipientsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *AwardsAPIService
|
||||||
|
awardId interface{}
|
||||||
|
season *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiAwardRecipientsRequest) Season(season interface{}) ApiAwardRecipientsRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiAwardRecipientsRequest) SportId(sportId interface{}) ApiAwardRecipientsRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiAwardRecipientsRequest) LeagueId(leagueId interface{}) ApiAwardRecipientsRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAwardRecipientsRequest) Fields(fields interface{}) ApiAwardRecipientsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAwardRecipientsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.AwardRecipientsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
AwardRecipients View recipients of an award
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param awardId Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
@return ApiAwardRecipientsRequest
|
||||||
|
*/
|
||||||
|
func (a *AwardsAPIService) AwardRecipients(ctx context.Context, awardId interface{}) ApiAwardRecipientsRequest {
|
||||||
|
return ApiAwardRecipientsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
awardId: awardId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *AwardsAPIService) AwardRecipientsExecute(r ApiAwardRecipientsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AwardsAPIService.AwardRecipients")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/awards/{awardId}/recipients"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"awardId"+"}", url.PathEscape(parameterValueToString(r.awardId, "awardId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiAwardsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *AwardsAPIService
|
||||||
|
awardId interface{}
|
||||||
|
orgId *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiAwardsRequest) OrgId(orgId interface{}) ApiAwardsRequest {
|
||||||
|
r.orgId = &orgId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiAwardsRequest) Fields(fields interface{}) ApiAwardsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAwardsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.AwardsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Awards View awards info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param awardId Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
@return ApiAwardsRequest
|
||||||
|
*/
|
||||||
|
func (a *AwardsAPIService) Awards(ctx context.Context, awardId interface{}) ApiAwardsRequest {
|
||||||
|
return ApiAwardsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
awardId: awardId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *AwardsAPIService) AwardsExecute(r ApiAwardsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AwardsAPIService.Awards")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/awards"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"awardId"+"}", url.PathEscape(parameterValueToString(r.awardId, "awardId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.orgId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "orgId", r.orgId, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiAwards1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *AwardsAPIService
|
||||||
|
awardId interface{}
|
||||||
|
orgId *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiAwards1Request) OrgId(orgId interface{}) ApiAwards1Request {
|
||||||
|
r.orgId = &orgId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiAwards1Request) Fields(fields interface{}) ApiAwards1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAwards1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Awards1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Awards1 View awards info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param awardId Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
@return ApiAwards1Request
|
||||||
|
*/
|
||||||
|
func (a *AwardsAPIService) Awards1(ctx context.Context, awardId interface{}) ApiAwards1Request {
|
||||||
|
return ApiAwards1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
awardId: awardId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *AwardsAPIService) Awards1Execute(r ApiAwards1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AwardsAPIService.Awards1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/awards/{awardId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"awardId"+"}", url.PathEscape(parameterValueToString(r.awardId, "awardId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.orgId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "orgId", r.orgId, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BatTrackingAPIService BatTrackingAPI service
|
||||||
|
type BatTrackingAPIService service
|
||||||
|
|
||||||
|
type ApiBatTrackingRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *BatTrackingAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
playId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiBatTrackingRequest) Fields(fields interface{}) ApiBatTrackingRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiBatTrackingRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.BatTrackingExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
BatTracking View Bat Tracking Data by playId and gameId
|
||||||
|
|
||||||
|
This endpoint allows you to pull bat tracking data by gameId and playId
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param playId Unique play identifier
|
||||||
|
@return ApiBatTrackingRequest
|
||||||
|
*/
|
||||||
|
func (a *BatTrackingAPIService) BatTracking(ctx context.Context, gamePk interface{}, playId interface{}) ApiBatTrackingRequest {
|
||||||
|
return ApiBatTrackingRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
playId: playId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *BatTrackingAPIService) BatTrackingExecute(r ApiBatTrackingRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BatTrackingAPIService.BatTracking")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/batTracking/game/{gamePk}/{playId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"playId"+"}", url.PathEscape(parameterValueToString(r.playId, "playId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BiomechanicsAPIService BiomechanicsAPI service
|
||||||
|
type BiomechanicsAPIService service
|
||||||
|
|
||||||
|
type ApiBiomechanicalRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *BiomechanicsAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
playId interface{}
|
||||||
|
positionId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiBiomechanicalRequest) Fields(fields interface{}) ApiBiomechanicalRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiBiomechanicalRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.BiomechanicalExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Biomechanical View Biomechanical data by playId and gameId filtered by player positionId
|
||||||
|
|
||||||
|
This endpoint allows you to pull biomechanical tracking data by gameId and playId filtered by player positionId
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param playId Unique play identifier
|
||||||
|
@param positionId Position number. Format: 1, 2, 3, etc
|
||||||
|
@return ApiBiomechanicalRequest
|
||||||
|
*/
|
||||||
|
func (a *BiomechanicsAPIService) Biomechanical(ctx context.Context, gamePk interface{}, playId interface{}, positionId interface{}) ApiBiomechanicalRequest {
|
||||||
|
return ApiBiomechanicalRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
playId: playId,
|
||||||
|
positionId: positionId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *BiomechanicsAPIService) BiomechanicalExecute(r ApiBiomechanicalRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BiomechanicsAPIService.Biomechanical")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/game/{gamePk}/{playId}/analytics/biomechanics/{positionId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"playId"+"}", url.PathEscape(parameterValueToString(r.playId, "playId")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"positionId"+"}", url.PathEscape(parameterValueToString(r.positionId, "positionId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,250 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BroadcastAPIService BroadcastAPI service
|
||||||
|
type BroadcastAPIService service
|
||||||
|
|
||||||
|
type ApiGetAllBroadcastersRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *BroadcastAPIService
|
||||||
|
activeStatus *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Current status of the broadcaster. Format: Active = y, inactive = n, both = b
|
||||||
|
func (r ApiGetAllBroadcastersRequest) ActiveStatus(activeStatus interface{}) ApiGetAllBroadcastersRequest {
|
||||||
|
r.activeStatus = &activeStatus
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetAllBroadcastersRequest) Fields(fields interface{}) ApiGetAllBroadcastersRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetAllBroadcastersRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetAllBroadcastersExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetAllBroadcasters Get All Active Broadcasters
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetAllBroadcastersRequest
|
||||||
|
*/
|
||||||
|
func (a *BroadcastAPIService) GetAllBroadcasters(ctx context.Context) ApiGetAllBroadcastersRequest {
|
||||||
|
return ApiGetAllBroadcastersRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *BroadcastAPIService) GetAllBroadcastersExecute(r ApiGetAllBroadcastersRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BroadcastAPIService.GetAllBroadcasters")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/broadcasters"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.activeStatus != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "activeStatus", r.activeStatus, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiGetBroadcastsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *BroadcastAPIService
|
||||||
|
broadcasterIds *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// All of the broadcast details
|
||||||
|
func (r ApiGetBroadcastsRequest) BroadcasterIds(broadcasterIds interface{}) ApiGetBroadcastsRequest {
|
||||||
|
r.broadcasterIds = &broadcasterIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetBroadcastsRequest) Fields(fields interface{}) ApiGetBroadcastsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetBroadcastsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetBroadcastsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetBroadcasts Get Broadcasters
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetBroadcastsRequest
|
||||||
|
*/
|
||||||
|
func (a *BroadcastAPIService) GetBroadcasts(ctx context.Context) ApiGetBroadcastsRequest {
|
||||||
|
return ApiGetBroadcastsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *BroadcastAPIService) GetBroadcastsExecute(r ApiGetBroadcastsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BroadcastAPIService.GetBroadcasts")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/broadcast"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.broadcasterIds == nil {
|
||||||
|
return nil, reportError("broadcasterIds is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "broadcasterIds", r.broadcasterIds, "", "")
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,276 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ConferenceAPIService ConferenceAPI service
|
||||||
|
type ConferenceAPIService service
|
||||||
|
|
||||||
|
type ApiConferencesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *ConferenceAPIService
|
||||||
|
conferenceId interface{}
|
||||||
|
season *interface{}
|
||||||
|
includeInactive *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiConferencesRequest) Season(season interface{}) ApiConferencesRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiConferencesRequest) IncludeInactive(includeInactive interface{}) ApiConferencesRequest {
|
||||||
|
r.includeInactive = &includeInactive
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiConferencesRequest) Fields(fields interface{}) ApiConferencesRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiConferencesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.ConferencesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Conferences View conference info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param conferenceId
|
||||||
|
@return ApiConferencesRequest
|
||||||
|
*/
|
||||||
|
func (a *ConferenceAPIService) Conferences(ctx context.Context, conferenceId interface{}) ApiConferencesRequest {
|
||||||
|
return ApiConferencesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
conferenceId: conferenceId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *ConferenceAPIService) ConferencesExecute(r ApiConferencesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConferenceAPIService.Conferences")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/conferences"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"conferenceId"+"}", url.PathEscape(parameterValueToString(r.conferenceId, "conferenceId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.includeInactive != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeInactive", r.includeInactive, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiConferences1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *ConferenceAPIService
|
||||||
|
conferenceId interface{}
|
||||||
|
season *interface{}
|
||||||
|
includeInactive *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiConferences1Request) Season(season interface{}) ApiConferences1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiConferences1Request) IncludeInactive(includeInactive interface{}) ApiConferences1Request {
|
||||||
|
r.includeInactive = &includeInactive
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiConferences1Request) Fields(fields interface{}) ApiConferences1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiConferences1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Conferences1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Conferences1 View conference info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param conferenceId
|
||||||
|
@return ApiConferences1Request
|
||||||
|
*/
|
||||||
|
func (a *ConferenceAPIService) Conferences1(ctx context.Context, conferenceId interface{}) ApiConferences1Request {
|
||||||
|
return ApiConferences1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
conferenceId: conferenceId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *ConferenceAPIService) Conferences1Execute(r ApiConferences1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConferenceAPIService.Conferences1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/conferences/{conferenceId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"conferenceId"+"}", url.PathEscape(parameterValueToString(r.conferenceId, "conferenceId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.includeInactive != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeInactive", r.includeInactive, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,322 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DivisionAPIService DivisionAPI service
|
||||||
|
type DivisionAPIService service
|
||||||
|
|
||||||
|
type ApiDivisionsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *DivisionAPIService
|
||||||
|
divisionId interface{}
|
||||||
|
includeInactive *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether or not to include inactive
|
||||||
|
func (r ApiDivisionsRequest) IncludeInactive(includeInactive interface{}) ApiDivisionsRequest {
|
||||||
|
r.includeInactive = &includeInactive
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiDivisionsRequest) LeagueId(leagueId interface{}) ApiDivisionsRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiDivisionsRequest) SportId(sportId interface{}) ApiDivisionsRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiDivisionsRequest) Season(season interface{}) ApiDivisionsRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiDivisionsRequest) Fields(fields interface{}) ApiDivisionsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiDivisionsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.DivisionsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Divisions Get division information
|
||||||
|
|
||||||
|
This endpoint allows you to pull divisions
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param divisionId Unique Division Identifier
|
||||||
|
@return ApiDivisionsRequest
|
||||||
|
*/
|
||||||
|
func (a *DivisionAPIService) Divisions(ctx context.Context, divisionId interface{}) ApiDivisionsRequest {
|
||||||
|
return ApiDivisionsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
divisionId: divisionId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *DivisionAPIService) DivisionsExecute(r ApiDivisionsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DivisionAPIService.Divisions")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/divisions"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"divisionId"+"}", url.PathEscape(parameterValueToString(r.divisionId, "divisionId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.includeInactive != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeInactive", r.includeInactive, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiDivisions1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *DivisionAPIService
|
||||||
|
divisionId interface{}
|
||||||
|
includeInactive *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether or not to include inactive
|
||||||
|
func (r ApiDivisions1Request) IncludeInactive(includeInactive interface{}) ApiDivisions1Request {
|
||||||
|
r.includeInactive = &includeInactive
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiDivisions1Request) LeagueId(leagueId interface{}) ApiDivisions1Request {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiDivisions1Request) SportId(sportId interface{}) ApiDivisions1Request {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiDivisions1Request) Season(season interface{}) ApiDivisions1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiDivisions1Request) Fields(fields interface{}) ApiDivisions1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiDivisions1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Divisions1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Divisions1 Get division information
|
||||||
|
|
||||||
|
This endpoint allows you to pull divisions
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param divisionId Unique Division Identifier
|
||||||
|
@return ApiDivisions1Request
|
||||||
|
*/
|
||||||
|
func (a *DivisionAPIService) Divisions1(ctx context.Context, divisionId interface{}) ApiDivisions1Request {
|
||||||
|
return ApiDivisions1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
divisionId: divisionId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *DivisionAPIService) Divisions1Execute(r ApiDivisions1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DivisionAPIService.Divisions1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/divisions/{divisionId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"divisionId"+"}", url.PathEscape(parameterValueToString(r.divisionId, "divisionId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.includeInactive != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeInactive", r.includeInactive, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,293 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GamePaceAPIService GamePaceAPI service
|
||||||
|
type GamePaceAPIService service
|
||||||
|
|
||||||
|
type ApiGamePaceRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *GamePaceAPIService
|
||||||
|
season *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
teamIds *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
leagueIds *interface{}
|
||||||
|
leagueListId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
sportIds *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
startDate *interface{}
|
||||||
|
endDate *interface{}
|
||||||
|
venueIds *interface{}
|
||||||
|
excludeVenueIds *interface{}
|
||||||
|
excludeGamePks *interface{}
|
||||||
|
orgType *interface{}
|
||||||
|
includeChildren *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiGamePaceRequest) Season(season interface{}) ApiGamePaceRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiGamePaceRequest) TeamId(teamId interface{}) ApiGamePaceRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique Team identifiers
|
||||||
|
func (r ApiGamePaceRequest) TeamIds(teamIds interface{}) ApiGamePaceRequest {
|
||||||
|
r.teamIds = &teamIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiGamePaceRequest) LeagueId(leagueId interface{}) ApiGamePaceRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiGamePaceRequest) LeagueIds(leagueIds interface{}) ApiGamePaceRequest {
|
||||||
|
r.leagueIds = &leagueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League List Identifier
|
||||||
|
func (r ApiGamePaceRequest) LeagueListId(leagueListId interface{}) ApiGamePaceRequest {
|
||||||
|
r.leagueListId = &leagueListId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiGamePaceRequest) SportId(sportId interface{}) ApiGamePaceRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiGamePaceRequest) SportIds(sportIds interface{}) ApiGamePaceRequest {
|
||||||
|
r.sportIds = &sportIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiGamePaceRequest) GameType(gameType interface{}) ApiGamePaceRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start date for range of data (must be used with end date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiGamePaceRequest) StartDate(startDate interface{}) ApiGamePaceRequest {
|
||||||
|
r.startDate = &startDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// End date for range of data (must be used with start date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiGamePaceRequest) EndDate(endDate interface{}) ApiGamePaceRequest {
|
||||||
|
r.endDate = &endDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique venue identifiers
|
||||||
|
func (r ApiGamePaceRequest) VenueIds(venueIds interface{}) ApiGamePaceRequest {
|
||||||
|
r.venueIds = &venueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique venue identifiers
|
||||||
|
func (r ApiGamePaceRequest) ExcludeVenueIds(excludeVenueIds interface{}) ApiGamePaceRequest {
|
||||||
|
r.excludeVenueIds = &excludeVenueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of unique primary keys
|
||||||
|
func (r ApiGamePaceRequest) ExcludeGamePks(excludeGamePks interface{}) ApiGamePaceRequest {
|
||||||
|
r.excludeGamePks = &excludeGamePks
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Organization level. Format: T(Team), L(League), S(Sport)
|
||||||
|
func (r ApiGamePaceRequest) OrgType(orgType interface{}) ApiGamePaceRequest {
|
||||||
|
r.orgType = &orgType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determines weather to include results from an organization's children (ex. a sport would also include results for the teams and leagues)
|
||||||
|
func (r ApiGamePaceRequest) IncludeChildren(includeChildren interface{}) ApiGamePaceRequest {
|
||||||
|
r.includeChildren = &includeChildren
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGamePaceRequest) Fields(fields interface{}) ApiGamePaceRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGamePaceRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GamePaceExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GamePace View time of game info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGamePaceRequest
|
||||||
|
*/
|
||||||
|
func (a *GamePaceAPIService) GamePace(ctx context.Context) ApiGamePaceRequest {
|
||||||
|
return ApiGamePaceRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *GamePaceAPIService) GamePaceExecute(r ApiGamePaceRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GamePaceAPIService.GamePace")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/gamePace"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.teamIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamIds", r.teamIds, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueIds", r.leagueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueListId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueListId", r.leagueListId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportIds", r.sportIds, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.startDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "startDate", r.startDate, "", "")
|
||||||
|
}
|
||||||
|
if r.endDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "endDate", r.endDate, "", "")
|
||||||
|
}
|
||||||
|
if r.venueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "venueIds", r.venueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.excludeVenueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "excludeVenueIds", r.excludeVenueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.excludeGamePks != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "excludeGamePks", r.excludeGamePks, "", "")
|
||||||
|
}
|
||||||
|
if r.orgType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "orgType", r.orgType, "", "")
|
||||||
|
}
|
||||||
|
if r.includeChildren != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeChildren", r.includeChildren, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,314 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HighLowAPIService HighLowAPI service
|
||||||
|
type HighLowAPIService service
|
||||||
|
|
||||||
|
type ApiHighLowRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HighLowAPIService
|
||||||
|
highLowType interface{}
|
||||||
|
statGroup *interface{}
|
||||||
|
sortStat *interface{}
|
||||||
|
season *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
offset *interface{}
|
||||||
|
limit *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
func (r ApiHighLowRequest) StatGroup(statGroup interface{}) ApiHighLowRequest {
|
||||||
|
r.statGroup = &statGroup
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of baseball stats to sort splits by.
|
||||||
|
func (r ApiHighLowRequest) SortStat(sortStat interface{}) ApiHighLowRequest {
|
||||||
|
r.sortStat = &sortStat
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiHighLowRequest) Season(season interface{}) ApiHighLowRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiHighLowRequest) GameType(gameType interface{}) ApiHighLowRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiHighLowRequest) TeamId(teamId interface{}) ApiHighLowRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiHighLowRequest) LeagueId(leagueId interface{}) ApiHighLowRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiHighLowRequest) SportId(sportId interface{}) ApiHighLowRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// The pointer to start for a return set; used for pagination
|
||||||
|
func (r ApiHighLowRequest) Offset(offset interface{}) ApiHighLowRequest {
|
||||||
|
r.offset = &offset
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of results to return
|
||||||
|
func (r ApiHighLowRequest) Limit(limit interface{}) ApiHighLowRequest {
|
||||||
|
r.limit = &limit
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHighLowRequest) Fields(fields interface{}) ApiHighLowRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHighLowRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HighLowExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HighLow View high/low stats by player or team
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param highLowType Type of high/low stats ('player', 'team', 'game')
|
||||||
|
@return ApiHighLowRequest
|
||||||
|
*/
|
||||||
|
func (a *HighLowAPIService) HighLow(ctx context.Context, highLowType interface{}) ApiHighLowRequest {
|
||||||
|
return ApiHighLowRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
highLowType: highLowType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HighLowAPIService) HighLowExecute(r ApiHighLowRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HighLowAPIService.HighLow")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/highLow/{highLowType}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"highLowType"+"}", url.PathEscape(parameterValueToString(r.highLowType, "highLowType")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.statGroup != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "statGroup", r.statGroup, "", "")
|
||||||
|
}
|
||||||
|
if r.sortStat != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sortStat", r.sortStat, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.offset != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "offset", r.offset, "", "")
|
||||||
|
}
|
||||||
|
if r.limit != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHighLowStatsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HighLowAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHighLowStatsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HighLowStatsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HighLowStats View high/low stat types
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiHighLowStatsRequest
|
||||||
|
*/
|
||||||
|
func (a *HighLowAPIService) HighLowStats(ctx context.Context) ApiHighLowStatsRequest {
|
||||||
|
return ApiHighLowStatsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HighLowAPIService) HighLowStatsExecute(r ApiHighLowStatsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HighLowAPIService.HighLowStats")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/highLow/types"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,854 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HomerunDerbyAPIService HomerunDerbyAPI service
|
||||||
|
type HomerunDerbyAPIService service
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyBracketRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyBracketRequest) Fields(fields interface{}) ApiHomeRunDerbyBracketRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyBracketRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyBracketExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyBracket View a home run derby object
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyBracketRequest
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyBracketRequest {
|
||||||
|
return ApiHomeRunDerbyBracketRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracketExecute(r ApiHomeRunDerbyBracketRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyBracket")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/{gamePk}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyBracket1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyBracket1Request) Fields(fields interface{}) ApiHomeRunDerbyBracket1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyBracket1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyBracket1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyBracket1 View a home run derby object
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyBracket1Request
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket1(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyBracket1Request {
|
||||||
|
return ApiHomeRunDerbyBracket1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket1Execute(r ApiHomeRunDerbyBracket1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyBracket1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyBracket2Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyBracket2Request) Fields(fields interface{}) ApiHomeRunDerbyBracket2Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyBracket2Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyBracket2Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyBracket2 View a home run derby object
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyBracket2Request
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket2(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyBracket2Request {
|
||||||
|
return ApiHomeRunDerbyBracket2Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket2Execute(r ApiHomeRunDerbyBracket2Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyBracket2")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/{gamePk}/bracket"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyBracket3Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyBracket3Request) Fields(fields interface{}) ApiHomeRunDerbyBracket3Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyBracket3Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyBracket3Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyBracket3 View a home run derby object
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyBracket3Request
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket3(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyBracket3Request {
|
||||||
|
return ApiHomeRunDerbyBracket3Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyBracket3Execute(r ApiHomeRunDerbyBracket3Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyBracket3")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/bracket"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyMixedModeRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyMixedModeRequest) Fields(fields interface{}) ApiHomeRunDerbyMixedModeRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyMixedModeRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyMixedModeExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyMixedMode View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyMixedModeRequest
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyMixedMode(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyMixedModeRequest {
|
||||||
|
return ApiHomeRunDerbyMixedModeRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyMixedModeExecute(r ApiHomeRunDerbyMixedModeRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyMixedMode")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/{gamePk}/mixed"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyMixedMode1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyMixedMode1Request) Fields(fields interface{}) ApiHomeRunDerbyMixedMode1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyMixedMode1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyMixedMode1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyMixedMode1 View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyMixedMode1Request
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyMixedMode1(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyMixedMode1Request {
|
||||||
|
return ApiHomeRunDerbyMixedMode1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyMixedMode1Execute(r ApiHomeRunDerbyMixedMode1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyMixedMode1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/mixed"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyPoolRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyPoolRequest) Fields(fields interface{}) ApiHomeRunDerbyPoolRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyPoolRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyPoolExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyPool View home run derby pool
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyPoolRequest
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyPool(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyPoolRequest {
|
||||||
|
return ApiHomeRunDerbyPoolRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyPoolExecute(r ApiHomeRunDerbyPoolRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyPool")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/{gamePk}/pool"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiHomeRunDerbyPool1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *HomerunDerbyAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiHomeRunDerbyPool1Request) Fields(fields interface{}) ApiHomeRunDerbyPool1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiHomeRunDerbyPool1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.HomeRunDerbyPool1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
HomeRunDerbyPool1 View home run derby pool
|
||||||
|
|
||||||
|
This endpoint allows you to pull home run derby information
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@return ApiHomeRunDerbyPool1Request
|
||||||
|
*/
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyPool1(ctx context.Context, gamePk interface{}) ApiHomeRunDerbyPool1Request {
|
||||||
|
return ApiHomeRunDerbyPool1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *HomerunDerbyAPIService) HomeRunDerbyPool1Execute(r ApiHomeRunDerbyPool1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HomerunDerbyAPIService.HomeRunDerbyPool1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/homeRunDerby/pool"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,644 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// JobAPIService JobAPI service
|
||||||
|
type JobAPIService service
|
||||||
|
|
||||||
|
type ApiDatacastersRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *JobAPIService
|
||||||
|
sportId *interface{}
|
||||||
|
date *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiDatacastersRequest) SportId(sportId interface{}) ApiDatacastersRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiDatacastersRequest) Date(date interface{}) ApiDatacastersRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiDatacastersRequest) Fields(fields interface{}) ApiDatacastersRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiDatacastersRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.DatacastersExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Datacasters Get datacaster jobs
|
||||||
|
|
||||||
|
Get datacaster jobs
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiDatacastersRequest
|
||||||
|
*/
|
||||||
|
func (a *JobAPIService) Datacasters(ctx context.Context) ApiDatacastersRequest {
|
||||||
|
return ApiDatacastersRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *JobAPIService) DatacastersExecute(r ApiDatacastersRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JobAPIService.Datacasters")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/jobs/datacasters"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiGetJobsByTypeRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *JobAPIService
|
||||||
|
jobType *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
date *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Job Type Identifier (ie. UMPR, etc..)
|
||||||
|
func (r ApiGetJobsByTypeRequest) JobType(jobType interface{}) ApiGetJobsByTypeRequest {
|
||||||
|
r.jobType = &jobType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiGetJobsByTypeRequest) SportId(sportId interface{}) ApiGetJobsByTypeRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiGetJobsByTypeRequest) Date(date interface{}) ApiGetJobsByTypeRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetJobsByTypeRequest) Fields(fields interface{}) ApiGetJobsByTypeRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetJobsByTypeRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetJobsByTypeExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetJobsByType Get jobs by type
|
||||||
|
|
||||||
|
This endpoint allows you to pull teams
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetJobsByTypeRequest
|
||||||
|
*/
|
||||||
|
func (a *JobAPIService) GetJobsByType(ctx context.Context) ApiGetJobsByTypeRequest {
|
||||||
|
return ApiGetJobsByTypeRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *JobAPIService) GetJobsByTypeExecute(r ApiGetJobsByTypeRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JobAPIService.GetJobsByType")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/jobs"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.jobType == nil {
|
||||||
|
return nil, reportError("jobType is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "jobType", r.jobType, "", "")
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiOfficialScorersRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *JobAPIService
|
||||||
|
sportId *interface{}
|
||||||
|
date *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiOfficialScorersRequest) SportId(sportId interface{}) ApiOfficialScorersRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiOfficialScorersRequest) Date(date interface{}) ApiOfficialScorersRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiOfficialScorersRequest) Fields(fields interface{}) ApiOfficialScorersRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiOfficialScorersRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.OfficialScorersExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
OfficialScorers Get official scorers
|
||||||
|
|
||||||
|
This endpoint allows you to pull teams
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiOfficialScorersRequest
|
||||||
|
*/
|
||||||
|
func (a *JobAPIService) OfficialScorers(ctx context.Context) ApiOfficialScorersRequest {
|
||||||
|
return ApiOfficialScorersRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *JobAPIService) OfficialScorersExecute(r ApiOfficialScorersRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JobAPIService.OfficialScorers")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/jobs/officialScorers"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiUmpireScheduleRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *JobAPIService
|
||||||
|
umpireId interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiUmpireScheduleRequest) Season(season interface{}) ApiUmpireScheduleRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiUmpireScheduleRequest) Fields(fields interface{}) ApiUmpireScheduleRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUmpireScheduleRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.UmpireScheduleExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UmpireSchedule Get umpires and associated game for umpireId
|
||||||
|
|
||||||
|
This endpoint allows you to pull teams
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param umpireId A unique identifier for an umpire
|
||||||
|
@return ApiUmpireScheduleRequest
|
||||||
|
*/
|
||||||
|
func (a *JobAPIService) UmpireSchedule(ctx context.Context, umpireId interface{}) ApiUmpireScheduleRequest {
|
||||||
|
return ApiUmpireScheduleRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
umpireId: umpireId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *JobAPIService) UmpireScheduleExecute(r ApiUmpireScheduleRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JobAPIService.UmpireSchedule")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/jobs/umpires/games/{umpireId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"umpireId"+"}", url.PathEscape(parameterValueToString(r.umpireId, "umpireId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.season == nil {
|
||||||
|
return nil, reportError("season is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiUmpiresRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *JobAPIService
|
||||||
|
sportId *interface{}
|
||||||
|
date *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
season *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiUmpiresRequest) SportId(sportId interface{}) ApiUmpiresRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiUmpiresRequest) Date(date interface{}) ApiUmpiresRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiUmpiresRequest) Fields(fields interface{}) ApiUmpiresRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiUmpiresRequest) Season(season interface{}) ApiUmpiresRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUmpiresRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.UmpiresExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Umpires Get umpires
|
||||||
|
|
||||||
|
This endpoint allows you to pull teams
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiUmpiresRequest
|
||||||
|
*/
|
||||||
|
func (a *JobAPIService) Umpires(ctx context.Context) ApiUmpiresRequest {
|
||||||
|
return ApiUmpiresRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *JobAPIService) UmpiresExecute(r ApiUmpiresRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JobAPIService.Umpires")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/jobs/umpires"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,723 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MilestonesAPIService MilestonesAPI service
|
||||||
|
type MilestonesAPIService service
|
||||||
|
|
||||||
|
type ApiAchievementStatusesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAchievementStatusesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.AchievementStatusesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
AchievementStatuses View available achievementStatus options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiAchievementStatusesRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) AchievementStatuses(ctx context.Context) ApiAchievementStatusesRequest {
|
||||||
|
return ApiAchievementStatusesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) AchievementStatusesExecute(r ApiAchievementStatusesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.AchievementStatuses")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/achievementStatuses"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiMilestoneDurationsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiMilestoneDurationsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.MilestoneDurationsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MilestoneDurations View available milestoneDurations options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiMilestoneDurationsRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) MilestoneDurations(ctx context.Context) ApiMilestoneDurationsRequest {
|
||||||
|
return ApiMilestoneDurationsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) MilestoneDurationsExecute(r ApiMilestoneDurationsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.MilestoneDurations")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/milestoneDurations"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiMilestoneLookupsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiMilestoneLookupsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.MilestoneLookupsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MilestoneLookups View available milestoneLookup options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiMilestoneLookupsRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) MilestoneLookups(ctx context.Context) ApiMilestoneLookupsRequest {
|
||||||
|
return ApiMilestoneLookupsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) MilestoneLookupsExecute(r ApiMilestoneLookupsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.MilestoneLookups")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/milestoneLookups"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiMilestoneStatisticsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiMilestoneStatisticsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.MilestoneStatisticsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MilestoneStatistics View available milestone statistics options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiMilestoneStatisticsRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) MilestoneStatistics(ctx context.Context) ApiMilestoneStatisticsRequest {
|
||||||
|
return ApiMilestoneStatisticsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) MilestoneStatisticsExecute(r ApiMilestoneStatisticsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.MilestoneStatistics")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/milestoneStatistics"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiMilestoneTypesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiMilestoneTypesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.MilestoneTypesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
MilestoneTypes View available milestoneType options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiMilestoneTypesRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) MilestoneTypes(ctx context.Context) ApiMilestoneTypesRequest {
|
||||||
|
return ApiMilestoneTypesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) MilestoneTypesExecute(r ApiMilestoneTypesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.MilestoneTypes")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/milestoneTypes"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiMilestonesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *MilestonesAPIService
|
||||||
|
orgType *interface{}
|
||||||
|
achievementStatuses *interface{}
|
||||||
|
milestoneTypes *interface{}
|
||||||
|
isLastAchievement *interface{}
|
||||||
|
milestoneStatistics *interface{}
|
||||||
|
milestoneValues *interface{}
|
||||||
|
playerIds *interface{}
|
||||||
|
teamIds *interface{}
|
||||||
|
leagueIds *interface{}
|
||||||
|
statGroup *interface{}
|
||||||
|
season *interface{}
|
||||||
|
seasons *interface{}
|
||||||
|
venueIds *interface{}
|
||||||
|
gamePks *interface{}
|
||||||
|
limit *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
showFirsts *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Organization level. Format: T(Team), L(League), S(Sport)
|
||||||
|
func (r ApiMilestonesRequest) OrgType(orgType interface{}) ApiMilestonesRequest {
|
||||||
|
r.orgType = &orgType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of milestone achievement types
|
||||||
|
func (r ApiMilestonesRequest) AchievementStatuses(achievementStatuses interface{}) ApiMilestonesRequest {
|
||||||
|
r.achievementStatuses = &achievementStatuses
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of milestone types
|
||||||
|
func (r ApiMilestonesRequest) MilestoneTypes(milestoneTypes interface{}) ApiMilestonesRequest {
|
||||||
|
r.milestoneTypes = &milestoneTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filters out milestones that have already been surpassed.
|
||||||
|
func (r ApiMilestonesRequest) IsLastAchievement(isLastAchievement interface{}) ApiMilestonesRequest {
|
||||||
|
r.isLastAchievement = &isLastAchievement
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of milestone statistics
|
||||||
|
func (r ApiMilestonesRequest) MilestoneStatistics(milestoneStatistics interface{}) ApiMilestonesRequest {
|
||||||
|
r.milestoneStatistics = &milestoneStatistics
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of milestone values
|
||||||
|
func (r ApiMilestonesRequest) MilestoneValues(milestoneValues interface{}) ApiMilestonesRequest {
|
||||||
|
r.milestoneValues = &milestoneValues
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// A unique identifier for players
|
||||||
|
func (r ApiMilestonesRequest) PlayerIds(playerIds interface{}) ApiMilestonesRequest {
|
||||||
|
r.playerIds = &playerIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique Team identifiers
|
||||||
|
func (r ApiMilestonesRequest) TeamIds(teamIds interface{}) ApiMilestonesRequest {
|
||||||
|
r.teamIds = &teamIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiMilestonesRequest) LeagueIds(leagueIds interface{}) ApiMilestonesRequest {
|
||||||
|
r.leagueIds = &leagueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Category of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
func (r ApiMilestonesRequest) StatGroup(statGroup interface{}) ApiMilestonesRequest {
|
||||||
|
r.statGroup = &statGroup
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiMilestonesRequest) Season(season interface{}) ApiMilestonesRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiMilestonesRequest) Seasons(seasons interface{}) ApiMilestonesRequest {
|
||||||
|
r.seasons = &seasons
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique venue identifiers
|
||||||
|
func (r ApiMilestonesRequest) VenueIds(venueIds interface{}) ApiMilestonesRequest {
|
||||||
|
r.venueIds = &venueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of unique primary keys
|
||||||
|
func (r ApiMilestonesRequest) GamePks(gamePks interface{}) ApiMilestonesRequest {
|
||||||
|
r.gamePks = &gamePks
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of results to return
|
||||||
|
func (r ApiMilestonesRequest) Limit(limit interface{}) ApiMilestonesRequest {
|
||||||
|
r.limit = &limit
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiMilestonesRequest) Fields(fields interface{}) ApiMilestonesRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// True to show play first milestones, like first HR, first Save, etc
|
||||||
|
func (r ApiMilestonesRequest) ShowFirsts(showFirsts interface{}) ApiMilestonesRequest {
|
||||||
|
r.showFirsts = &showFirsts
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiMilestonesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.MilestonesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Milestones View pending and achieved milestones.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiMilestonesRequest
|
||||||
|
*/
|
||||||
|
func (a *MilestonesAPIService) Milestones(ctx context.Context) ApiMilestonesRequest {
|
||||||
|
return ApiMilestonesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *MilestonesAPIService) MilestonesExecute(r ApiMilestonesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MilestonesAPIService.Milestones")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/milestones"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.orgType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "orgType", r.orgType, "", "")
|
||||||
|
}
|
||||||
|
if r.achievementStatuses != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "achievementStatuses", r.achievementStatuses, "", "")
|
||||||
|
}
|
||||||
|
if r.milestoneTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "milestoneTypes", r.milestoneTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.isLastAchievement != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "isLastAchievement", r.isLastAchievement, "", "")
|
||||||
|
}
|
||||||
|
if r.milestoneStatistics != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "milestoneStatistics", r.milestoneStatistics, "", "")
|
||||||
|
}
|
||||||
|
if r.milestoneValues != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "milestoneValues", r.milestoneValues, "", "")
|
||||||
|
}
|
||||||
|
if r.playerIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "playerIds", r.playerIds, "", "")
|
||||||
|
}
|
||||||
|
if r.teamIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamIds", r.teamIds, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueIds", r.leagueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.statGroup != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "statGroup", r.statGroup, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.seasons != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "seasons", r.seasons, "", "")
|
||||||
|
}
|
||||||
|
if r.venueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "venueIds", r.venueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.gamePks != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gamePks", r.gamePks, "", "")
|
||||||
|
}
|
||||||
|
if r.limit != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.showFirsts != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "showFirsts", r.showFirsts, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,294 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PredictionsAPIService PredictionsAPI service
|
||||||
|
type PredictionsAPIService service
|
||||||
|
|
||||||
|
type ApiGetPropsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *PredictionsAPIService
|
||||||
|
batterId *interface{}
|
||||||
|
pitcherId *interface{}
|
||||||
|
venueId *interface{}
|
||||||
|
batSide *interface{}
|
||||||
|
pitchHand *interface{}
|
||||||
|
batterPosition *interface{}
|
||||||
|
pitcherPosition *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
func (r ApiGetPropsRequest) BatterId(batterId interface{}) ApiGetPropsRequest {
|
||||||
|
r.batterId = &batterId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
func (r ApiGetPropsRequest) PitcherId(pitcherId interface{}) ApiGetPropsRequest {
|
||||||
|
r.pitcherId = &pitcherId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Venue Identifier
|
||||||
|
func (r ApiGetPropsRequest) VenueId(venueId interface{}) ApiGetPropsRequest {
|
||||||
|
r.venueId = &venueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bat side of hitter
|
||||||
|
func (r ApiGetPropsRequest) BatSide(batSide interface{}) ApiGetPropsRequest {
|
||||||
|
r.batSide = &batSide
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handedness of pitcher
|
||||||
|
func (r ApiGetPropsRequest) PitchHand(pitchHand interface{}) ApiGetPropsRequest {
|
||||||
|
r.pitchHand = &pitchHand
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Position abbreviation. Format: SS, P, 1B, etc
|
||||||
|
func (r ApiGetPropsRequest) BatterPosition(batterPosition interface{}) ApiGetPropsRequest {
|
||||||
|
r.batterPosition = &batterPosition
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Position abbreviation. Format: SS, P, 1B, etc
|
||||||
|
func (r ApiGetPropsRequest) PitcherPosition(pitcherPosition interface{}) ApiGetPropsRequest {
|
||||||
|
r.pitcherPosition = &pitcherPosition
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetPropsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetPropsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetProps Get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
This endpoint allows you to get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetPropsRequest
|
||||||
|
*/
|
||||||
|
func (a *PredictionsAPIService) GetProps(ctx context.Context) ApiGetPropsRequest {
|
||||||
|
return ApiGetPropsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *PredictionsAPIService) GetPropsExecute(r ApiGetPropsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PredictionsAPIService.GetProps")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/props/play/predictions"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.batterId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "batterId", r.batterId, "", "")
|
||||||
|
}
|
||||||
|
if r.pitcherId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "pitcherId", r.pitcherId, "", "")
|
||||||
|
}
|
||||||
|
if r.venueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "venueId", r.venueId, "", "")
|
||||||
|
}
|
||||||
|
if r.batSide != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "batSide", r.batSide, "", "")
|
||||||
|
}
|
||||||
|
if r.pitchHand != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "pitchHand", r.pitchHand, "", "")
|
||||||
|
}
|
||||||
|
if r.batterPosition != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "batterPosition", r.batterPosition, "", "")
|
||||||
|
}
|
||||||
|
if r.pitcherPosition != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "pitcherPosition", r.pitcherPosition, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiGetPropsAdjustRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *PredictionsAPIService
|
||||||
|
gamePk *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Primary Key Representing a Game
|
||||||
|
func (r ApiGetPropsAdjustRequest) GamePk(gamePk interface{}) ApiGetPropsAdjustRequest {
|
||||||
|
r.gamePk = &gamePk
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetPropsAdjustRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetPropsAdjustExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetPropsAdjust Get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
This endpoint allows you to get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetPropsAdjustRequest
|
||||||
|
*/
|
||||||
|
func (a *PredictionsAPIService) GetPropsAdjust(ctx context.Context) ApiGetPropsAdjustRequest {
|
||||||
|
return ApiGetPropsAdjustRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *PredictionsAPIService) GetPropsAdjustExecute(r ApiGetPropsAdjustRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PredictionsAPIService.GetPropsAdjust")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/props/play/predictions/adjust"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.gamePk == nil {
|
||||||
|
return nil, reportError("gamePk is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gamePk", r.gamePk, "", "")
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,165 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReviewsAPIService ReviewsAPI service
|
||||||
|
type ReviewsAPIService service
|
||||||
|
|
||||||
|
type ApiGetReviewInfoRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *ReviewsAPIService
|
||||||
|
sportId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiGetReviewInfoRequest) SportId(sportId interface{}) ApiGetReviewInfoRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiGetReviewInfoRequest) Season(season interface{}) ApiGetReviewInfoRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiGetReviewInfoRequest) GameType(gameType interface{}) ApiGetReviewInfoRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetReviewInfoRequest) Fields(fields interface{}) ApiGetReviewInfoRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetReviewInfoRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetReviewInfoExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetReviewInfo Get review info
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetReviewInfoRequest
|
||||||
|
*/
|
||||||
|
func (a *ReviewsAPIService) GetReviewInfo(ctx context.Context) ApiGetReviewInfoRequest {
|
||||||
|
return ApiGetReviewInfoRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *ReviewsAPIService) GetReviewInfoExecute(r ApiGetReviewInfoRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReviewsAPIService.GetReviewInfo")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/review"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.sportId == nil {
|
||||||
|
return nil, reportError("sportId is required and must be specified")
|
||||||
|
}
|
||||||
|
if r.season == nil {
|
||||||
|
return nil, reportError("season is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,440 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SeasonAPIService SeasonAPI service
|
||||||
|
type SeasonAPIService service
|
||||||
|
|
||||||
|
type ApiAllSeasonsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SeasonAPIService
|
||||||
|
divisionId *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
withGameTypeDates *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Division Identifier
|
||||||
|
func (r ApiAllSeasonsRequest) DivisionId(divisionId interface{}) ApiAllSeasonsRequest {
|
||||||
|
r.divisionId = &divisionId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiAllSeasonsRequest) LeagueId(leagueId interface{}) ApiAllSeasonsRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiAllSeasonsRequest) SportId(sportId interface{}) ApiAllSeasonsRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve dates for each game type
|
||||||
|
func (r ApiAllSeasonsRequest) WithGameTypeDates(withGameTypeDates interface{}) ApiAllSeasonsRequest {
|
||||||
|
r.withGameTypeDates = &withGameTypeDates
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiAllSeasonsRequest) Fields(fields interface{}) ApiAllSeasonsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAllSeasonsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.AllSeasonsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
AllSeasons View all seasons
|
||||||
|
|
||||||
|
This endpoint allows you to view all seasons for a given Division, League or Sport
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiAllSeasonsRequest
|
||||||
|
*/
|
||||||
|
func (a *SeasonAPIService) AllSeasons(ctx context.Context) ApiAllSeasonsRequest {
|
||||||
|
return ApiAllSeasonsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SeasonAPIService) AllSeasonsExecute(r ApiAllSeasonsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SeasonAPIService.AllSeasons")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/seasons/all"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.divisionId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "divisionId", r.divisionId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.withGameTypeDates != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "withGameTypeDates", r.withGameTypeDates, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSeasonsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SeasonAPIService
|
||||||
|
seasonId interface{}
|
||||||
|
season *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
withGameTypeDates *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiSeasonsRequest) Season(season interface{}) ApiSeasonsRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiSeasonsRequest) SportId(sportId interface{}) ApiSeasonsRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve dates for each game type
|
||||||
|
func (r ApiSeasonsRequest) WithGameTypeDates(withGameTypeDates interface{}) ApiSeasonsRequest {
|
||||||
|
r.withGameTypeDates = &withGameTypeDates
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSeasonsRequest) Fields(fields interface{}) ApiSeasonsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSeasonsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.SeasonsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Seasons View season info
|
||||||
|
|
||||||
|
This endpoint allows you to pull seasons
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param seasonId Season of play
|
||||||
|
@return ApiSeasonsRequest
|
||||||
|
*/
|
||||||
|
func (a *SeasonAPIService) Seasons(ctx context.Context, seasonId interface{}) ApiSeasonsRequest {
|
||||||
|
return ApiSeasonsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
seasonId: seasonId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SeasonAPIService) SeasonsExecute(r ApiSeasonsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SeasonAPIService.Seasons")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/seasons"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"seasonId"+"}", url.PathEscape(parameterValueToString(r.seasonId, "seasonId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.withGameTypeDates != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "withGameTypeDates", r.withGameTypeDates, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSeasons1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SeasonAPIService
|
||||||
|
seasonId interface{}
|
||||||
|
season *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
withGameTypeDates *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiSeasons1Request) Season(season interface{}) ApiSeasons1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiSeasons1Request) SportId(sportId interface{}) ApiSeasons1Request {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve dates for each game type
|
||||||
|
func (r ApiSeasons1Request) WithGameTypeDates(withGameTypeDates interface{}) ApiSeasons1Request {
|
||||||
|
r.withGameTypeDates = &withGameTypeDates
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSeasons1Request) Fields(fields interface{}) ApiSeasons1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSeasons1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Seasons1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Seasons1 View season info
|
||||||
|
|
||||||
|
This endpoint allows you to pull seasons
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param seasonId Season of play
|
||||||
|
@return ApiSeasons1Request
|
||||||
|
*/
|
||||||
|
func (a *SeasonAPIService) Seasons1(ctx context.Context, seasonId interface{}) ApiSeasons1Request {
|
||||||
|
return ApiSeasons1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
seasonId: seasonId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SeasonAPIService) Seasons1Execute(r ApiSeasons1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SeasonAPIService.Seasons1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/seasons/{seasonId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"seasonId"+"}", url.PathEscape(parameterValueToString(r.seasonId, "seasonId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.withGameTypeDates != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "withGameTypeDates", r.withGameTypeDates, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,261 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SkeletalAPIService SkeletalAPI service
|
||||||
|
type SkeletalAPIService service
|
||||||
|
|
||||||
|
type ApiSkeletalChunkedRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SkeletalAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
playId interface{}
|
||||||
|
fileName *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skeletal chunked file name
|
||||||
|
func (r ApiSkeletalChunkedRequest) FileName(fileName interface{}) ApiSkeletalChunkedRequest {
|
||||||
|
r.fileName = &fileName
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSkeletalChunkedRequest) Fields(fields interface{}) ApiSkeletalChunkedRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSkeletalChunkedRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.SkeletalChunkedExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
SkeletalChunked View Skeletal Data by playId and gameId chunked
|
||||||
|
|
||||||
|
This endpoint allows you to pull chunked skeletal tracking data by gameId and playId
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param playId Unique play identifier
|
||||||
|
@return ApiSkeletalChunkedRequest
|
||||||
|
*/
|
||||||
|
func (a *SkeletalAPIService) SkeletalChunked(ctx context.Context, gamePk interface{}, playId interface{}) ApiSkeletalChunkedRequest {
|
||||||
|
return ApiSkeletalChunkedRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
playId: playId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SkeletalAPIService) SkeletalChunkedExecute(r ApiSkeletalChunkedRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SkeletalAPIService.SkeletalChunked")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/game/{gamePk}/{playId}/analytics/skeletalData/chunked"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"playId"+"}", url.PathEscape(parameterValueToString(r.playId, "playId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.fileName == nil {
|
||||||
|
return nil, reportError("fileName is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fileName", r.fileName, "", "")
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSkeletalDataFileNamesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SkeletalAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
playId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSkeletalDataFileNamesRequest) Fields(fields interface{}) ApiSkeletalDataFileNamesRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSkeletalDataFileNamesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.SkeletalDataFileNamesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
SkeletalDataFileNames View Skeletal Data by playId and gameId files
|
||||||
|
|
||||||
|
This endpoint allows you to pull chunked skeletal tracking data by gameId and playId
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param playId Unique play identifier
|
||||||
|
@return ApiSkeletalDataFileNamesRequest
|
||||||
|
*/
|
||||||
|
func (a *SkeletalAPIService) SkeletalDataFileNames(ctx context.Context, gamePk interface{}, playId interface{}) ApiSkeletalDataFileNamesRequest {
|
||||||
|
return ApiSkeletalDataFileNamesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
playId: playId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SkeletalAPIService) SkeletalDataFileNamesExecute(r ApiSkeletalDataFileNamesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SkeletalAPIService.SkeletalDataFileNames")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/game/{gamePk}/{playId}/analytics/skeletalData/files"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"playId"+"}", url.PathEscape(parameterValueToString(r.playId, "playId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,556 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SportsAPIService SportsAPI service
|
||||||
|
type SportsAPIService service
|
||||||
|
|
||||||
|
type ApiAllSportBallotRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SportsAPIService
|
||||||
|
sportId interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// season
|
||||||
|
func (r ApiAllSportBallotRequest) Season(season interface{}) ApiAllSportBallotRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAllSportBallotRequest) Fields(fields interface{}) ApiAllSportBallotRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiAllSportBallotRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.AllSportBallotExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
AllSportBallot Get ALL MLB ballot for sport
|
||||||
|
|
||||||
|
This endpoint allows you to get all players for MLB ballot
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param sportId Top level organization of a sport
|
||||||
|
@return ApiAllSportBallotRequest
|
||||||
|
*/
|
||||||
|
func (a *SportsAPIService) AllSportBallot(ctx context.Context, sportId interface{}) ApiAllSportBallotRequest {
|
||||||
|
return ApiAllSportBallotRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
sportId: sportId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SportsAPIService) AllSportBallotExecute(r ApiAllSportBallotRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SportsAPIService.AllSportBallot")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/sports/{sportId}/allSportBallot"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"sportId"+"}", url.PathEscape(parameterValueToString(r.sportId, "sportId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.season == nil {
|
||||||
|
return nil, reportError("season is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSportPlayersRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SportsAPIService
|
||||||
|
sportId interface{}
|
||||||
|
season *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
hasStats *interface{}
|
||||||
|
accent *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiSportPlayersRequest) Season(season interface{}) ApiSportPlayersRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiSportPlayersRequest) GameType(gameType interface{}) ApiSportPlayersRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns sports that have individual player stats
|
||||||
|
func (r ApiSportPlayersRequest) HasStats(hasStats interface{}) ApiSportPlayersRequest {
|
||||||
|
r.hasStats = &hasStats
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Boolean value to specify wanting a person's name with accents or without
|
||||||
|
func (r ApiSportPlayersRequest) Accent(accent interface{}) ApiSportPlayersRequest {
|
||||||
|
r.accent = &accent
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSportPlayersRequest) Fields(fields interface{}) ApiSportPlayersRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSportPlayersRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.SportPlayersExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
SportPlayers Get all players for a sport level
|
||||||
|
|
||||||
|
This endpoint allows you to pull all players for a given sport
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param sportId Top level organization of a sport
|
||||||
|
@return ApiSportPlayersRequest
|
||||||
|
*/
|
||||||
|
func (a *SportsAPIService) SportPlayers(ctx context.Context, sportId interface{}) ApiSportPlayersRequest {
|
||||||
|
return ApiSportPlayersRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
sportId: sportId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SportsAPIService) SportPlayersExecute(r ApiSportPlayersRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SportsAPIService.SportPlayers")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/sports/{sportId}/players"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"sportId"+"}", url.PathEscape(parameterValueToString(r.sportId, "sportId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.hasStats != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "hasStats", r.hasStats, "", "")
|
||||||
|
}
|
||||||
|
if r.accent != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "accent", r.accent, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSportsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SportsAPIService
|
||||||
|
sportId interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
hasStats *interface{}
|
||||||
|
activeStatus *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiSportsRequest) Season(season interface{}) ApiSportsRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSportsRequest) Fields(fields interface{}) ApiSportsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns sports that have individual player stats
|
||||||
|
func (r ApiSportsRequest) HasStats(hasStats interface{}) ApiSportsRequest {
|
||||||
|
r.hasStats = &hasStats
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B)
|
||||||
|
func (r ApiSportsRequest) ActiveStatus(activeStatus interface{}) ApiSportsRequest {
|
||||||
|
r.activeStatus = &activeStatus
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSportsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.SportsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Sports Get sports information
|
||||||
|
|
||||||
|
This endpoint allows you to pull sports
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param sportId Top level organization of a sport
|
||||||
|
@return ApiSportsRequest
|
||||||
|
*/
|
||||||
|
func (a *SportsAPIService) Sports(ctx context.Context, sportId interface{}) ApiSportsRequest {
|
||||||
|
return ApiSportsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
sportId: sportId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SportsAPIService) SportsExecute(r ApiSportsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SportsAPIService.Sports")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/sports"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"sportId"+"}", url.PathEscape(parameterValueToString(r.sportId, "sportId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.hasStats != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "hasStats", r.hasStats, "", "")
|
||||||
|
}
|
||||||
|
if r.activeStatus != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "activeStatus", r.activeStatus, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiSports1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *SportsAPIService
|
||||||
|
sportId interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
hasStats *interface{}
|
||||||
|
activeStatus *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiSports1Request) Season(season interface{}) ApiSports1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiSports1Request) Fields(fields interface{}) ApiSports1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns sports that have individual player stats
|
||||||
|
func (r ApiSports1Request) HasStats(hasStats interface{}) ApiSports1Request {
|
||||||
|
r.hasStats = &hasStats
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B)
|
||||||
|
func (r ApiSports1Request) ActiveStatus(activeStatus interface{}) ApiSports1Request {
|
||||||
|
r.activeStatus = &activeStatus
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiSports1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Sports1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Sports1 Get sports information
|
||||||
|
|
||||||
|
This endpoint allows you to pull sports
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param sportId Top level organization of a sport
|
||||||
|
@return ApiSports1Request
|
||||||
|
*/
|
||||||
|
func (a *SportsAPIService) Sports1(ctx context.Context, sportId interface{}) ApiSports1Request {
|
||||||
|
return ApiSports1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
sportId: sportId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *SportsAPIService) Sports1Execute(r ApiSports1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SportsAPIService.Sports1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/sports/{sportId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"sportId"+"}", url.PathEscape(parameterValueToString(r.sportId, "sportId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.hasStats != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "hasStats", r.hasStats, "", "")
|
||||||
|
}
|
||||||
|
if r.activeStatus != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "activeStatus", r.activeStatus, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,362 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StandingsAPIService StandingsAPI service
|
||||||
|
type StandingsAPIService service
|
||||||
|
|
||||||
|
type ApiStandingsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *StandingsAPIService
|
||||||
|
standingsType interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
standingsTypes *interface{}
|
||||||
|
date *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
includeMLB *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiStandingsRequest) LeagueId(leagueId interface{}) ApiStandingsRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiStandingsRequest) Season(season interface{}) ApiStandingsRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
func (r ApiStandingsRequest) StandingsTypes(standingsTypes interface{}) ApiStandingsRequest {
|
||||||
|
r.standingsTypes = &standingsTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiStandingsRequest) Date(date interface{}) ApiStandingsRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiStandingsRequest) TeamId(teamId interface{}) ApiStandingsRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type
|
||||||
|
func (r ApiStandingsRequest) IncludeMLB(includeMLB interface{}) ApiStandingsRequest {
|
||||||
|
r.includeMLB = &includeMLB
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiStandingsRequest) Fields(fields interface{}) ApiStandingsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiStandingsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.StandingsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Standings View standings for a league
|
||||||
|
|
||||||
|
This endpoint allows you to pull standings
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param standingsType Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
@return ApiStandingsRequest
|
||||||
|
*/
|
||||||
|
func (a *StandingsAPIService) Standings(ctx context.Context, standingsType interface{}) ApiStandingsRequest {
|
||||||
|
return ApiStandingsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
standingsType: standingsType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *StandingsAPIService) StandingsExecute(r ApiStandingsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StandingsAPIService.Standings")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/standings/{standingsType}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"standingsType"+"}", url.PathEscape(parameterValueToString(r.standingsType, "standingsType")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.standingsTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "standingsTypes", r.standingsTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.includeMLB != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeMLB", r.includeMLB, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiStandings1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *StandingsAPIService
|
||||||
|
standingsType interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
season *interface{}
|
||||||
|
standingsTypes *interface{}
|
||||||
|
date *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
includeMLB *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiStandings1Request) LeagueId(leagueId interface{}) ApiStandings1Request {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiStandings1Request) Season(season interface{}) ApiStandings1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
func (r ApiStandings1Request) StandingsTypes(standingsTypes interface{}) ApiStandings1Request {
|
||||||
|
r.standingsTypes = &standingsTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiStandings1Request) Date(date interface{}) ApiStandings1Request {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiStandings1Request) TeamId(teamId interface{}) ApiStandings1Request {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type
|
||||||
|
func (r ApiStandings1Request) IncludeMLB(includeMLB interface{}) ApiStandings1Request {
|
||||||
|
r.includeMLB = &includeMLB
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiStandings1Request) Fields(fields interface{}) ApiStandings1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiStandings1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Standings1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Standings1 View standings for a league
|
||||||
|
|
||||||
|
This endpoint allows you to pull standings
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param standingsType Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
@return ApiStandings1Request
|
||||||
|
*/
|
||||||
|
func (a *StandingsAPIService) Standings1(ctx context.Context, standingsType interface{}) ApiStandings1Request {
|
||||||
|
return ApiStandings1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
standingsType: standingsType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *StandingsAPIService) Standings1Execute(r ApiStandings1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StandingsAPIService.Standings1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/standings"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"standingsType"+"}", url.PathEscape(parameterValueToString(r.standingsType, "standingsType")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.standingsTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "standingsTypes", r.standingsTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.includeMLB != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeMLB", r.includeMLB, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,372 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// StreaksAPIService StreaksAPI service
|
||||||
|
type StreaksAPIService service
|
||||||
|
|
||||||
|
type ApiGetStreaksRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *StreaksAPIService
|
||||||
|
streakOrg *interface{}
|
||||||
|
streakStat *interface{}
|
||||||
|
streakSpan *interface{}
|
||||||
|
streakLevel *interface{}
|
||||||
|
streakThreshold *interface{}
|
||||||
|
inverse *interface{}
|
||||||
|
startersOnly *interface{}
|
||||||
|
statGroup *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
season *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
activeStreak *interface{}
|
||||||
|
limit *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
playerId *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StreakOrg(streakOrg interface{}) ApiGetStreaksRequest {
|
||||||
|
r.streakOrg = &streakOrg
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StreakStat(streakStat interface{}) ApiGetStreaksRequest {
|
||||||
|
r.streakStat = &streakStat
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StreakSpan(streakSpan interface{}) ApiGetStreaksRequest {
|
||||||
|
r.streakSpan = &streakSpan
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StreakLevel(streakLevel interface{}) ApiGetStreaksRequest {
|
||||||
|
r.streakLevel = &streakLevel
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StreakThreshold(streakThreshold interface{}) ApiGetStreaksRequest {
|
||||||
|
r.streakThreshold = &streakThreshold
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) Inverse(inverse interface{}) ApiGetStreaksRequest {
|
||||||
|
r.inverse = &inverse
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) StartersOnly(startersOnly interface{}) ApiGetStreaksRequest {
|
||||||
|
r.startersOnly = &startersOnly
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Category of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
func (r ApiGetStreaksRequest) StatGroup(statGroup interface{}) ApiGetStreaksRequest {
|
||||||
|
r.statGroup = &statGroup
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiGetStreaksRequest) GameType(gameType interface{}) ApiGetStreaksRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiGetStreaksRequest) Season(season interface{}) ApiGetStreaksRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
func (r ApiGetStreaksRequest) TeamId(teamId interface{}) ApiGetStreaksRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiGetStreaksRequest) LeagueId(leagueId interface{}) ApiGetStreaksRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiGetStreaksRequest) SportId(sportId interface{}) ApiGetStreaksRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether or not a player is active
|
||||||
|
func (r ApiGetStreaksRequest) ActiveStreak(activeStreak interface{}) ApiGetStreaksRequest {
|
||||||
|
r.activeStreak = &activeStreak
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of results to return
|
||||||
|
func (r ApiGetStreaksRequest) Limit(limit interface{}) ApiGetStreaksRequest {
|
||||||
|
r.limit = &limit
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiGetStreaksRequest) Fields(fields interface{}) ApiGetStreaksRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// A unique identifier for a player
|
||||||
|
func (r ApiGetStreaksRequest) PlayerId(playerId interface{}) ApiGetStreaksRequest {
|
||||||
|
r.playerId = &playerId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiGetStreaksRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.GetStreaksExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
GetStreaks View streaks
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiGetStreaksRequest
|
||||||
|
*/
|
||||||
|
func (a *StreaksAPIService) GetStreaks(ctx context.Context) ApiGetStreaksRequest {
|
||||||
|
return ApiGetStreaksRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *StreaksAPIService) GetStreaksExecute(r ApiGetStreaksRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StreaksAPIService.GetStreaks")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/streaks"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.streakOrg != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "streakOrg", r.streakOrg, "", "")
|
||||||
|
}
|
||||||
|
if r.streakStat != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "streakStat", r.streakStat, "", "")
|
||||||
|
}
|
||||||
|
if r.streakSpan != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "streakSpan", r.streakSpan, "", "")
|
||||||
|
}
|
||||||
|
if r.streakLevel != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "streakLevel", r.streakLevel, "", "")
|
||||||
|
}
|
||||||
|
if r.streakThreshold != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "streakThreshold", r.streakThreshold, "", "")
|
||||||
|
}
|
||||||
|
if r.inverse != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "inverse", r.inverse, "", "")
|
||||||
|
}
|
||||||
|
if r.startersOnly != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "startersOnly", r.startersOnly, "", "")
|
||||||
|
}
|
||||||
|
if r.statGroup != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "statGroup", r.statGroup, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.activeStreak != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "activeStreak", r.activeStreak, "", "")
|
||||||
|
}
|
||||||
|
if r.limit != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.playerId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "playerId", r.playerId, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiStreakTypesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *StreaksAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiStreakTypesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.StreakTypesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
StreakTypes View streaks parameter options
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiStreakTypesRequest
|
||||||
|
*/
|
||||||
|
func (a *StreaksAPIService) StreakTypes(ctx context.Context) ApiStreakTypesRequest {
|
||||||
|
return ApiStreakTypesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *StreaksAPIService) StreakTypesExecute(r ApiStreakTypesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StreaksAPIService.StreakTypes")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/streaks/types"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,250 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TransactionsAPIService TransactionsAPI service
|
||||||
|
type TransactionsAPIService service
|
||||||
|
|
||||||
|
type ApiTransactionsRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *TransactionsAPIService
|
||||||
|
leagueId *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
teamId *interface{}
|
||||||
|
playerId *interface{}
|
||||||
|
date *interface{}
|
||||||
|
startDate *interface{}
|
||||||
|
endDate *interface{}
|
||||||
|
transactionIds *interface{}
|
||||||
|
transactionTypes *interface{}
|
||||||
|
divisionIds *interface{}
|
||||||
|
order *interface{}
|
||||||
|
limit *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiTransactionsRequest) LeagueId(leagueId interface{}) ApiTransactionsRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiTransactionsRequest) SportId(sportId interface{}) ApiTransactionsRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique Team identifiers
|
||||||
|
func (r ApiTransactionsRequest) TeamId(teamId interface{}) ApiTransactionsRequest {
|
||||||
|
r.teamId = &teamId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// A unique identifier for a player
|
||||||
|
func (r ApiTransactionsRequest) PlayerId(playerId interface{}) ApiTransactionsRequest {
|
||||||
|
r.playerId = &playerId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date of Game. Format: YYYY-MM-DD
|
||||||
|
func (r ApiTransactionsRequest) Date(date interface{}) ApiTransactionsRequest {
|
||||||
|
r.date = &date
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start date for range of data (must be used with end date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiTransactionsRequest) StartDate(startDate interface{}) ApiTransactionsRequest {
|
||||||
|
r.startDate = &startDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// End date for range of data (must be used with start date). Format: MM/DD/YYYY
|
||||||
|
func (r ApiTransactionsRequest) EndDate(endDate interface{}) ApiTransactionsRequest {
|
||||||
|
r.endDate = &endDate
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) TransactionIds(transactionIds interface{}) ApiTransactionsRequest {
|
||||||
|
r.transactionIds = &transactionIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) TransactionTypes(transactionTypes interface{}) ApiTransactionsRequest {
|
||||||
|
r.transactionTypes = &transactionTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) DivisionIds(divisionIds interface{}) ApiTransactionsRequest {
|
||||||
|
r.divisionIds = &divisionIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) Order(order interface{}) ApiTransactionsRequest {
|
||||||
|
r.order = &order
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) Limit(limit interface{}) ApiTransactionsRequest {
|
||||||
|
r.limit = &limit
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiTransactionsRequest) Fields(fields interface{}) ApiTransactionsRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiTransactionsRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.TransactionsExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Transactions View transaction info
|
||||||
|
|
||||||
|
This endpoint allows you to pull transactions.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiTransactionsRequest
|
||||||
|
*/
|
||||||
|
func (a *TransactionsAPIService) Transactions(ctx context.Context) ApiTransactionsRequest {
|
||||||
|
return ApiTransactionsRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *TransactionsAPIService) TransactionsExecute(r ApiTransactionsRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.Transactions")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/transactions"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.teamId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamId", r.teamId, "", "")
|
||||||
|
}
|
||||||
|
if r.playerId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "playerId", r.playerId, "", "")
|
||||||
|
}
|
||||||
|
if r.date != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "date", r.date, "", "")
|
||||||
|
}
|
||||||
|
if r.startDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "startDate", r.startDate, "", "")
|
||||||
|
}
|
||||||
|
if r.endDate != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "endDate", r.endDate, "", "")
|
||||||
|
}
|
||||||
|
if r.transactionIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "transactionIds", r.transactionIds, "", "")
|
||||||
|
}
|
||||||
|
if r.transactionTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "transactionTypes", r.transactionTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.divisionIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "divisionIds", r.divisionIds, "", "")
|
||||||
|
}
|
||||||
|
if r.order != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "order", r.order, "", "")
|
||||||
|
}
|
||||||
|
if r.limit != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,264 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UniformsAPIService UniformsAPI service
|
||||||
|
type UniformsAPIService service
|
||||||
|
|
||||||
|
type ApiUniformsByGameRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *UniformsAPIService
|
||||||
|
gamePks *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of unique primary keys
|
||||||
|
func (r ApiUniformsByGameRequest) GamePks(gamePks interface{}) ApiUniformsByGameRequest {
|
||||||
|
r.gamePks = &gamePks
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiUniformsByGameRequest) Fields(fields interface{}) ApiUniformsByGameRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUniformsByGameRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.UniformsByGameExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UniformsByGame View Game Uniform info
|
||||||
|
|
||||||
|
This endpoint allows you to pull team uniform data for a game
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiUniformsByGameRequest
|
||||||
|
*/
|
||||||
|
func (a *UniformsAPIService) UniformsByGame(ctx context.Context) ApiUniformsByGameRequest {
|
||||||
|
return ApiUniformsByGameRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *UniformsAPIService) UniformsByGameExecute(r ApiUniformsByGameRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UniformsAPIService.UniformsByGame")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/uniforms/game"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.gamePks == nil {
|
||||||
|
return nil, reportError("gamePks is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gamePks", r.gamePks, "", "")
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiUniformsByTeamRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *UniformsAPIService
|
||||||
|
teamIds *interface{}
|
||||||
|
season *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUniformsByTeamRequest) TeamIds(teamIds interface{}) ApiUniformsByTeamRequest {
|
||||||
|
r.teamIds = &teamIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiUniformsByTeamRequest) Season(season interface{}) ApiUniformsByTeamRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiUniformsByTeamRequest) Fields(fields interface{}) ApiUniformsByTeamRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiUniformsByTeamRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.UniformsByTeamExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
UniformsByTeam View Team Uniform info
|
||||||
|
|
||||||
|
This endpoint allows you to pull team uniform data for a season
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@return ApiUniformsByTeamRequest
|
||||||
|
*/
|
||||||
|
func (a *UniformsAPIService) UniformsByTeam(ctx context.Context) ApiUniformsByTeamRequest {
|
||||||
|
return ApiUniformsByTeamRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *UniformsAPIService) UniformsByTeamExecute(r ApiUniformsByTeamRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UniformsAPIService.UniformsByTeam")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/uniforms/team"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
if r.teamIds == nil {
|
||||||
|
return nil, reportError("teamIds is required and must be specified")
|
||||||
|
}
|
||||||
|
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "teamIds", r.teamIds, "", "")
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,460 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// VenuesAPIService VenuesAPI service
|
||||||
|
type VenuesAPIService service
|
||||||
|
|
||||||
|
type ApiVenuesRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *VenuesAPIService
|
||||||
|
venueId interface{}
|
||||||
|
venueIds *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
leagueIds *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
gameTypes *interface{}
|
||||||
|
season *interface{}
|
||||||
|
seasons *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
active *interface{}
|
||||||
|
includeEvents *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
sportIds *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique venue identifiers
|
||||||
|
func (r ApiVenuesRequest) VenueIds(venueIds interface{}) ApiVenuesRequest {
|
||||||
|
r.venueIds = &venueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiVenuesRequest) LeagueId(leagueId interface{}) ApiVenuesRequest {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiVenuesRequest) LeagueIds(leagueIds interface{}) ApiVenuesRequest {
|
||||||
|
r.leagueIds = &leagueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiVenuesRequest) GameType(gameType interface{}) ApiVenuesRequest {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiVenuesRequest) GameTypes(gameTypes interface{}) ApiVenuesRequest {
|
||||||
|
r.gameTypes = &gameTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiVenuesRequest) Season(season interface{}) ApiVenuesRequest {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiVenuesRequest) Seasons(seasons interface{}) ApiVenuesRequest {
|
||||||
|
r.seasons = &seasons
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiVenuesRequest) Fields(fields interface{}) ApiVenuesRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether or not a player is active
|
||||||
|
func (r ApiVenuesRequest) Active(active interface{}) ApiVenuesRequest {
|
||||||
|
r.active = &active
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiVenuesRequest) IncludeEvents(includeEvents interface{}) ApiVenuesRequest {
|
||||||
|
r.includeEvents = &includeEvents
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiVenuesRequest) SportId(sportId interface{}) ApiVenuesRequest {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiVenuesRequest) SportIds(sportIds interface{}) ApiVenuesRequest {
|
||||||
|
r.sportIds = &sportIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiVenuesRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.VenuesExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Venues View venue info
|
||||||
|
|
||||||
|
This endpoint allows you to pull venues
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param venueId Unique Venue Identifier
|
||||||
|
@return ApiVenuesRequest
|
||||||
|
*/
|
||||||
|
func (a *VenuesAPIService) Venues(ctx context.Context, venueId interface{}) ApiVenuesRequest {
|
||||||
|
return ApiVenuesRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
venueId: venueId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *VenuesAPIService) VenuesExecute(r ApiVenuesRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VenuesAPIService.Venues")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/venues"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"venueId"+"}", url.PathEscape(parameterValueToString(r.venueId, "venueId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.venueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "venueIds", r.venueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueIds", r.leagueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.gameTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameTypes", r.gameTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.seasons != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "seasons", r.seasons, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.active != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "", "")
|
||||||
|
}
|
||||||
|
if r.includeEvents != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeEvents", r.includeEvents, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportIds", r.sportIds, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiVenues1Request struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *VenuesAPIService
|
||||||
|
venueId interface{}
|
||||||
|
venueIds *interface{}
|
||||||
|
leagueId *interface{}
|
||||||
|
leagueIds *interface{}
|
||||||
|
gameType *interface{}
|
||||||
|
gameTypes *interface{}
|
||||||
|
season *interface{}
|
||||||
|
seasons *interface{}
|
||||||
|
fields *interface{}
|
||||||
|
active *interface{}
|
||||||
|
includeEvents *interface{}
|
||||||
|
sportId *interface{}
|
||||||
|
sportIds *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique venue identifiers
|
||||||
|
func (r ApiVenues1Request) VenueIds(venueIds interface{}) ApiVenues1Request {
|
||||||
|
r.venueIds = &venueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unique League Identifier
|
||||||
|
func (r ApiVenues1Request) LeagueId(leagueId interface{}) ApiVenues1Request {
|
||||||
|
r.leagueId = &leagueId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Unique league identifiers
|
||||||
|
func (r ApiVenues1Request) LeagueIds(leagueIds interface{}) ApiVenues1Request {
|
||||||
|
r.leagueIds = &leagueIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiVenues1Request) GameType(gameType interface{}) ApiVenues1Request {
|
||||||
|
r.gameType = &gameType
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of type of Game. Available types in /api/v1/gameTypes
|
||||||
|
func (r ApiVenues1Request) GameTypes(gameTypes interface{}) ApiVenues1Request {
|
||||||
|
r.gameTypes = &gameTypes
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Season of play
|
||||||
|
func (r ApiVenues1Request) Season(season interface{}) ApiVenues1Request {
|
||||||
|
r.season = &season
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of Seasons of play
|
||||||
|
func (r ApiVenues1Request) Seasons(seasons interface{}) ApiVenues1Request {
|
||||||
|
r.seasons = &seasons
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiVenues1Request) Fields(fields interface{}) ApiVenues1Request {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Whether or not a player is active
|
||||||
|
func (r ApiVenues1Request) Active(active interface{}) ApiVenues1Request {
|
||||||
|
r.active = &active
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiVenues1Request) IncludeEvents(includeEvents interface{}) ApiVenues1Request {
|
||||||
|
r.includeEvents = &includeEvents
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top level organization of a sport
|
||||||
|
func (r ApiVenues1Request) SportId(sportId interface{}) ApiVenues1Request {
|
||||||
|
r.sportId = &sportId
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of top level organizations of a sport
|
||||||
|
func (r ApiVenues1Request) SportIds(sportIds interface{}) ApiVenues1Request {
|
||||||
|
r.sportIds = &sportIds
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiVenues1Request) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.Venues1Execute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Venues1 View venue info
|
||||||
|
|
||||||
|
This endpoint allows you to pull venues
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param venueId Unique Venue Identifier
|
||||||
|
@return ApiVenues1Request
|
||||||
|
*/
|
||||||
|
func (a *VenuesAPIService) Venues1(ctx context.Context, venueId interface{}) ApiVenues1Request {
|
||||||
|
return ApiVenues1Request{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
venueId: venueId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *VenuesAPIService) Venues1Execute(r ApiVenues1Request) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VenuesAPIService.Venues1")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/venues/{venueId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"venueId"+"}", url.PathEscape(parameterValueToString(r.venueId, "venueId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.venueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "venueIds", r.venueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueId", r.leagueId, "", "")
|
||||||
|
}
|
||||||
|
if r.leagueIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "leagueIds", r.leagueIds, "", "")
|
||||||
|
}
|
||||||
|
if r.gameType != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameType", r.gameType, "", "")
|
||||||
|
}
|
||||||
|
if r.gameTypes != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "gameTypes", r.gameTypes, "", "")
|
||||||
|
}
|
||||||
|
if r.season != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "season", r.season, "", "")
|
||||||
|
}
|
||||||
|
if r.seasons != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "seasons", r.seasons, "", "")
|
||||||
|
}
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
if r.active != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "", "")
|
||||||
|
}
|
||||||
|
if r.includeEvents != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "includeEvents", r.includeEvents, "", "")
|
||||||
|
}
|
||||||
|
if r.sportId != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportId", r.sportId, "", "")
|
||||||
|
}
|
||||||
|
if r.sportIds != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "sportIds", r.sportIds, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,454 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// WeatherAPIService WeatherAPI service
|
||||||
|
type WeatherAPIService service
|
||||||
|
|
||||||
|
type ApiWeatherBasicRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *WeatherAPIService
|
||||||
|
venueId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiWeatherBasicRequest) Fields(fields interface{}) ApiWeatherBasicRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiWeatherBasicRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.WeatherBasicExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
WeatherBasic Get basic weather for a venue.
|
||||||
|
|
||||||
|
Returns a json file containing basic weather for a specific venue.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param venueId Unique Venue Identifier
|
||||||
|
@return ApiWeatherBasicRequest
|
||||||
|
*/
|
||||||
|
func (a *WeatherAPIService) WeatherBasic(ctx context.Context, venueId interface{}) ApiWeatherBasicRequest {
|
||||||
|
return ApiWeatherBasicRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
venueId: venueId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *WeatherAPIService) WeatherBasicExecute(r ApiWeatherBasicRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WeatherAPIService.WeatherBasic")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/weather/venues/{venueId}/basic"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"venueId"+"}", url.PathEscape(parameterValueToString(r.venueId, "venueId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiWeatherDataBasedOnPlayRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *WeatherAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
playId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiWeatherDataBasedOnPlayRequest) Fields(fields interface{}) ApiWeatherDataBasedOnPlayRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiWeatherDataBasedOnPlayRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.WeatherDataBasedOnPlayExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
WeatherDataBasedOnPlay Get the raw field weather data.
|
||||||
|
|
||||||
|
Returns a json file containing weather for the current play.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param playId Unique identifier for a play within a game
|
||||||
|
@return ApiWeatherDataBasedOnPlayRequest
|
||||||
|
*/
|
||||||
|
func (a *WeatherAPIService) WeatherDataBasedOnPlay(ctx context.Context, gamePk interface{}, playId interface{}) ApiWeatherDataBasedOnPlayRequest {
|
||||||
|
return ApiWeatherDataBasedOnPlayRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
playId: playId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *WeatherAPIService) WeatherDataBasedOnPlayExecute(r ApiWeatherDataBasedOnPlayRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WeatherAPIService.WeatherDataBasedOnPlay")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/weather/game/{gamePk}/{playId}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"playId"+"}", url.PathEscape(parameterValueToString(r.playId, "playId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiWeatherForecastRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *WeatherAPIService
|
||||||
|
gamePk interface{}
|
||||||
|
roofType interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiWeatherForecastRequest) Fields(fields interface{}) ApiWeatherForecastRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiWeatherForecastRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.WeatherForecastExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
WeatherForecast Get the weather forecast for a game.
|
||||||
|
|
||||||
|
Returns a json file containing the weather forecast for a specific game.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param gamePk Unique Primary Key Representing a Game
|
||||||
|
@param roofType Venue roof type
|
||||||
|
@return ApiWeatherForecastRequest
|
||||||
|
*/
|
||||||
|
func (a *WeatherAPIService) WeatherForecast(ctx context.Context, gamePk interface{}, roofType interface{}) ApiWeatherForecastRequest {
|
||||||
|
return ApiWeatherForecastRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
gamePk: gamePk,
|
||||||
|
roofType: roofType,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *WeatherAPIService) WeatherForecastExecute(r ApiWeatherForecastRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WeatherAPIService.WeatherForecast")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/weather/game/{gamePk}/forecast/{roofType}"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"gamePk"+"}", url.PathEscape(parameterValueToString(r.gamePk, "gamePk")), -1)
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"roofType"+"}", url.PathEscape(parameterValueToString(r.roofType, "roofType")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ApiWeatherFullRequest struct {
|
||||||
|
ctx context.Context
|
||||||
|
ApiService *WeatherAPIService
|
||||||
|
venueId interface{}
|
||||||
|
fields *interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute
|
||||||
|
func (r ApiWeatherFullRequest) Fields(fields interface{}) ApiWeatherFullRequest {
|
||||||
|
r.fields = &fields
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ApiWeatherFullRequest) Execute() (*http.Response, error) {
|
||||||
|
return r.ApiService.WeatherFullExecute(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
WeatherFull Get full weather for a venue.
|
||||||
|
|
||||||
|
Returns a json file containing full weather for a specific venue.
|
||||||
|
|
||||||
|
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
@param venueId Unique Venue Identifier
|
||||||
|
@return ApiWeatherFullRequest
|
||||||
|
*/
|
||||||
|
func (a *WeatherAPIService) WeatherFull(ctx context.Context, venueId interface{}) ApiWeatherFullRequest {
|
||||||
|
return ApiWeatherFullRequest{
|
||||||
|
ApiService: a,
|
||||||
|
ctx: ctx,
|
||||||
|
venueId: venueId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute executes the request
|
||||||
|
func (a *WeatherAPIService) WeatherFullExecute(r ApiWeatherFullRequest) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHTTPMethod = http.MethodGet
|
||||||
|
localVarPostBody interface{}
|
||||||
|
formFiles []formFile
|
||||||
|
)
|
||||||
|
|
||||||
|
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WeatherAPIService.WeatherFull")
|
||||||
|
if err != nil {
|
||||||
|
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarPath := localBasePath + "/api/v1/weather/venues/{venueId}/full"
|
||||||
|
localVarPath = strings.Replace(localVarPath, "{"+"venueId"+"}", url.PathEscape(parameterValueToString(r.venueId, "venueId")), -1)
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
if r.fields != nil {
|
||||||
|
parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "", "")
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHTTPContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||||
|
if localVarHTTPContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHTTPHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||||
|
if localVarHTTPHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||||
|
}
|
||||||
|
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||||
|
if err != nil || localVarHTTPResponse == nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||||
|
localVarHTTPResponse.Body.Close()
|
||||||
|
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||||
|
if err != nil {
|
||||||
|
return localVarHTTPResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHTTPResponse.StatusCode >= 300 {
|
||||||
|
newErr := &GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHTTPResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHTTPResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHTTPResponse, nil
|
||||||
|
}
|
|
@ -0,0 +1,763 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"encoding/xml"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
"mime/multipart"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"reflect"
|
||||||
|
"regexp"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
|
||||||
|
XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
|
||||||
|
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||||
|
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||||
|
)
|
||||||
|
|
||||||
|
// APIClient manages communication with the Stats API Documentation API v2.0.0
|
||||||
|
// In most cases there should be only one, shared, APIClient.
|
||||||
|
type APIClient struct {
|
||||||
|
cfg *Configuration
|
||||||
|
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||||
|
|
||||||
|
// API Services
|
||||||
|
|
||||||
|
AnalyticsAPI *AnalyticsAPIService
|
||||||
|
|
||||||
|
AttendanceAPI *AttendanceAPIService
|
||||||
|
|
||||||
|
AwardsAPI *AwardsAPIService
|
||||||
|
|
||||||
|
BatTrackingAPI *BatTrackingAPIService
|
||||||
|
|
||||||
|
BiomechanicsAPI *BiomechanicsAPIService
|
||||||
|
|
||||||
|
BroadcastAPI *BroadcastAPIService
|
||||||
|
|
||||||
|
ConferenceAPI *ConferenceAPIService
|
||||||
|
|
||||||
|
DivisionAPI *DivisionAPIService
|
||||||
|
|
||||||
|
DraftAPI *DraftAPIService
|
||||||
|
|
||||||
|
GameAPI *GameAPIService
|
||||||
|
|
||||||
|
GamePaceAPI *GamePaceAPIService
|
||||||
|
|
||||||
|
HighLowAPI *HighLowAPIService
|
||||||
|
|
||||||
|
HomerunDerbyAPI *HomerunDerbyAPIService
|
||||||
|
|
||||||
|
JobAPI *JobAPIService
|
||||||
|
|
||||||
|
LeagueAPI *LeagueAPIService
|
||||||
|
|
||||||
|
MilestonesAPI *MilestonesAPIService
|
||||||
|
|
||||||
|
MiscAPI *MiscAPIService
|
||||||
|
|
||||||
|
PersonAPI *PersonAPIService
|
||||||
|
|
||||||
|
PredictionsAPI *PredictionsAPIService
|
||||||
|
|
||||||
|
ReviewsAPI *ReviewsAPIService
|
||||||
|
|
||||||
|
ScheduleAPI *ScheduleAPIService
|
||||||
|
|
||||||
|
SeasonAPI *SeasonAPIService
|
||||||
|
|
||||||
|
SkeletalAPI *SkeletalAPIService
|
||||||
|
|
||||||
|
SportsAPI *SportsAPIService
|
||||||
|
|
||||||
|
StandingsAPI *StandingsAPIService
|
||||||
|
|
||||||
|
StatsAPI *StatsAPIService
|
||||||
|
|
||||||
|
StreaksAPI *StreaksAPIService
|
||||||
|
|
||||||
|
TeamsAPI *TeamsAPIService
|
||||||
|
|
||||||
|
TransactionsAPI *TransactionsAPIService
|
||||||
|
|
||||||
|
UniformsAPI *UniformsAPIService
|
||||||
|
|
||||||
|
VenuesAPI *VenuesAPIService
|
||||||
|
|
||||||
|
WeatherAPI *WeatherAPIService
|
||||||
|
}
|
||||||
|
|
||||||
|
type service struct {
|
||||||
|
client *APIClient
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
|
||||||
|
// optionally a custom http.Client to allow for advanced features such as caching.
|
||||||
|
func NewAPIClient(cfg *Configuration) *APIClient {
|
||||||
|
if cfg.HTTPClient == nil {
|
||||||
|
cfg.HTTPClient = http.DefaultClient
|
||||||
|
}
|
||||||
|
|
||||||
|
c := &APIClient{}
|
||||||
|
c.cfg = cfg
|
||||||
|
c.common.client = c
|
||||||
|
|
||||||
|
// API Services
|
||||||
|
c.AnalyticsAPI = (*AnalyticsAPIService)(&c.common)
|
||||||
|
c.AttendanceAPI = (*AttendanceAPIService)(&c.common)
|
||||||
|
c.AwardsAPI = (*AwardsAPIService)(&c.common)
|
||||||
|
c.BatTrackingAPI = (*BatTrackingAPIService)(&c.common)
|
||||||
|
c.BiomechanicsAPI = (*BiomechanicsAPIService)(&c.common)
|
||||||
|
c.BroadcastAPI = (*BroadcastAPIService)(&c.common)
|
||||||
|
c.ConferenceAPI = (*ConferenceAPIService)(&c.common)
|
||||||
|
c.DivisionAPI = (*DivisionAPIService)(&c.common)
|
||||||
|
c.DraftAPI = (*DraftAPIService)(&c.common)
|
||||||
|
c.GameAPI = (*GameAPIService)(&c.common)
|
||||||
|
c.GamePaceAPI = (*GamePaceAPIService)(&c.common)
|
||||||
|
c.HighLowAPI = (*HighLowAPIService)(&c.common)
|
||||||
|
c.HomerunDerbyAPI = (*HomerunDerbyAPIService)(&c.common)
|
||||||
|
c.JobAPI = (*JobAPIService)(&c.common)
|
||||||
|
c.LeagueAPI = (*LeagueAPIService)(&c.common)
|
||||||
|
c.MilestonesAPI = (*MilestonesAPIService)(&c.common)
|
||||||
|
c.MiscAPI = (*MiscAPIService)(&c.common)
|
||||||
|
c.PersonAPI = (*PersonAPIService)(&c.common)
|
||||||
|
c.PredictionsAPI = (*PredictionsAPIService)(&c.common)
|
||||||
|
c.ReviewsAPI = (*ReviewsAPIService)(&c.common)
|
||||||
|
c.ScheduleAPI = (*ScheduleAPIService)(&c.common)
|
||||||
|
c.SeasonAPI = (*SeasonAPIService)(&c.common)
|
||||||
|
c.SkeletalAPI = (*SkeletalAPIService)(&c.common)
|
||||||
|
c.SportsAPI = (*SportsAPIService)(&c.common)
|
||||||
|
c.StandingsAPI = (*StandingsAPIService)(&c.common)
|
||||||
|
c.StatsAPI = (*StatsAPIService)(&c.common)
|
||||||
|
c.StreaksAPI = (*StreaksAPIService)(&c.common)
|
||||||
|
c.TeamsAPI = (*TeamsAPIService)(&c.common)
|
||||||
|
c.TransactionsAPI = (*TransactionsAPIService)(&c.common)
|
||||||
|
c.UniformsAPI = (*UniformsAPIService)(&c.common)
|
||||||
|
c.VenuesAPI = (*VenuesAPIService)(&c.common)
|
||||||
|
c.WeatherAPI = (*WeatherAPIService)(&c.common)
|
||||||
|
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
func atoi(in string) (int, error) {
|
||||||
|
return strconv.Atoi(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderContentType select a content type from the available list.
|
||||||
|
func selectHeaderContentType(contentTypes []string) string {
|
||||||
|
if len(contentTypes) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if contains(contentTypes, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||||
|
}
|
||||||
|
|
||||||
|
// selectHeaderAccept join all accept types and return
|
||||||
|
func selectHeaderAccept(accepts []string) string {
|
||||||
|
if len(accepts) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if contains(accepts, "application/json") {
|
||||||
|
return "application/json"
|
||||||
|
}
|
||||||
|
|
||||||
|
return strings.Join(accepts, ",")
|
||||||
|
}
|
||||||
|
|
||||||
|
// contains is a case insensitive match, finding needle in a haystack
|
||||||
|
func contains(haystack []string, needle string) bool {
|
||||||
|
for _, a := range haystack {
|
||||||
|
if strings.EqualFold(a, needle) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify optional parameters are of the correct type.
|
||||||
|
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||||
|
// Make sure there is an object.
|
||||||
|
if obj == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the type is as expected.
|
||||||
|
if reflect.TypeOf(obj).String() != expected {
|
||||||
|
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func parameterValueToString(obj interface{}, key string) string {
|
||||||
|
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
|
||||||
|
if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok {
|
||||||
|
return fmt.Sprintf("%v", actualObj.GetActualInstanceValue())
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%v", obj)
|
||||||
|
}
|
||||||
|
var param, ok = obj.(MappedNullable)
|
||||||
|
if !ok {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
dataMap, err := param.ToMap()
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return fmt.Sprintf("%v", dataMap[key])
|
||||||
|
}
|
||||||
|
|
||||||
|
// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
|
||||||
|
// supporting deep object syntax
|
||||||
|
func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) {
|
||||||
|
var v = reflect.ValueOf(obj)
|
||||||
|
var value = ""
|
||||||
|
if v == reflect.ValueOf(nil) {
|
||||||
|
value = "null"
|
||||||
|
} else {
|
||||||
|
switch v.Kind() {
|
||||||
|
case reflect.Invalid:
|
||||||
|
value = "invalid"
|
||||||
|
|
||||||
|
case reflect.Struct:
|
||||||
|
if t, ok := obj.(MappedNullable); ok {
|
||||||
|
dataMap, err := t.ToMap()
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if t, ok := obj.(time.Time); ok {
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
value = v.Type().String() + " value"
|
||||||
|
case reflect.Slice:
|
||||||
|
var indValue = reflect.ValueOf(obj)
|
||||||
|
if indValue == reflect.ValueOf(nil) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var lenIndValue = indValue.Len()
|
||||||
|
for i := 0; i < lenIndValue; i++ {
|
||||||
|
var arrayValue = indValue.Index(i)
|
||||||
|
var keyPrefixForCollectionType = keyPrefix
|
||||||
|
if style == "deepObject" {
|
||||||
|
keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]"
|
||||||
|
}
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Map:
|
||||||
|
var indValue = reflect.ValueOf(obj)
|
||||||
|
if indValue == reflect.ValueOf(nil) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
iter := indValue.MapRange()
|
||||||
|
for iter.Next() {
|
||||||
|
k, v := iter.Key(), iter.Value()
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Interface:
|
||||||
|
fallthrough
|
||||||
|
case reflect.Ptr:
|
||||||
|
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType)
|
||||||
|
return
|
||||||
|
|
||||||
|
case reflect.Int, reflect.Int8, reflect.Int16,
|
||||||
|
reflect.Int32, reflect.Int64:
|
||||||
|
value = strconv.FormatInt(v.Int(), 10)
|
||||||
|
case reflect.Uint, reflect.Uint8, reflect.Uint16,
|
||||||
|
reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||||
|
value = strconv.FormatUint(v.Uint(), 10)
|
||||||
|
case reflect.Float32, reflect.Float64:
|
||||||
|
value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
|
||||||
|
case reflect.Bool:
|
||||||
|
value = strconv.FormatBool(v.Bool())
|
||||||
|
case reflect.String:
|
||||||
|
value = v.String()
|
||||||
|
default:
|
||||||
|
value = v.Type().String() + " value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch valuesMap := headerOrQueryParams.(type) {
|
||||||
|
case url.Values:
|
||||||
|
if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
|
||||||
|
valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
|
||||||
|
} else {
|
||||||
|
valuesMap.Add(keyPrefix, value)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case map[string]string:
|
||||||
|
valuesMap[keyPrefix] = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// helper for converting interface{} parameters to json strings
|
||||||
|
func parameterToJson(obj interface{}) (string, error) {
|
||||||
|
jsonBuf, err := json.Marshal(obj)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return string(jsonBuf), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// callAPI do the request.
|
||||||
|
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpRequestOut(request, true)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := c.cfg.HTTPClient.Do(request)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.cfg.Debug {
|
||||||
|
dump, err := httputil.DumpResponse(resp, true)
|
||||||
|
if err != nil {
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
log.Printf("\n%s\n", string(dump))
|
||||||
|
}
|
||||||
|
return resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow modification of underlying config for alternate implementations and testing
|
||||||
|
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||||
|
func (c *APIClient) GetConfig() *Configuration {
|
||||||
|
return c.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
type formFile struct {
|
||||||
|
fileBytes []byte
|
||||||
|
fileName string
|
||||||
|
formFileName string
|
||||||
|
}
|
||||||
|
|
||||||
|
// prepareRequest build the request
|
||||||
|
func (c *APIClient) prepareRequest(
|
||||||
|
ctx context.Context,
|
||||||
|
path string, method string,
|
||||||
|
postBody interface{},
|
||||||
|
headerParams map[string]string,
|
||||||
|
queryParams url.Values,
|
||||||
|
formParams url.Values,
|
||||||
|
formFiles []formFile) (localVarRequest *http.Request, err error) {
|
||||||
|
|
||||||
|
var body *bytes.Buffer
|
||||||
|
|
||||||
|
// Detect postBody type and post.
|
||||||
|
if postBody != nil {
|
||||||
|
contentType := headerParams["Content-Type"]
|
||||||
|
if contentType == "" {
|
||||||
|
contentType = detectContentType(postBody)
|
||||||
|
headerParams["Content-Type"] = contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
body, err = setBody(postBody, contentType)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add form parameters and file if available.
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
|
||||||
|
if body != nil {
|
||||||
|
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
w := multipart.NewWriter(body)
|
||||||
|
|
||||||
|
for k, v := range formParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
if strings.HasPrefix(k, "@") { // file
|
||||||
|
err = addFile(w, k[1:], iv)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
} else { // form value
|
||||||
|
w.WriteField(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, formFile := range formFiles {
|
||||||
|
if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
|
||||||
|
w.Boundary()
|
||||||
|
part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
_, err = part.Write(formFile.fileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the Boundary in the Content-Type
|
||||||
|
headerParams["Content-Type"] = w.FormDataContentType()
|
||||||
|
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
w.Close()
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||||
|
if body != nil {
|
||||||
|
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||||
|
}
|
||||||
|
body = &bytes.Buffer{}
|
||||||
|
body.WriteString(formParams.Encode())
|
||||||
|
// Set Content-Length
|
||||||
|
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup path and query parameters
|
||||||
|
url, err := url.Parse(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request host, if applicable
|
||||||
|
if c.cfg.Host != "" {
|
||||||
|
url.Host = c.cfg.Host
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override request scheme, if applicable
|
||||||
|
if c.cfg.Scheme != "" {
|
||||||
|
url.Scheme = c.cfg.Scheme
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adding Query Param
|
||||||
|
query := url.Query()
|
||||||
|
for k, v := range queryParams {
|
||||||
|
for _, iv := range v {
|
||||||
|
query.Add(k, iv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Encode the parameters.
|
||||||
|
url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
|
||||||
|
pieces := strings.Split(s, "=")
|
||||||
|
pieces[0] = queryDescape.Replace(pieces[0])
|
||||||
|
return strings.Join(pieces, "=")
|
||||||
|
})
|
||||||
|
|
||||||
|
// Generate a new request
|
||||||
|
if body != nil {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||||
|
} else {
|
||||||
|
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// add header parameters, if any
|
||||||
|
if len(headerParams) > 0 {
|
||||||
|
headers := http.Header{}
|
||||||
|
for h, v := range headerParams {
|
||||||
|
headers[h] = []string{v}
|
||||||
|
}
|
||||||
|
localVarRequest.Header = headers
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the user agent to the request.
|
||||||
|
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||||
|
|
||||||
|
if ctx != nil {
|
||||||
|
// add context to the request
|
||||||
|
localVarRequest = localVarRequest.WithContext(ctx)
|
||||||
|
|
||||||
|
// Walk through any authentication.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for header, value := range c.cfg.DefaultHeader {
|
||||||
|
localVarRequest.Header.Add(header, value)
|
||||||
|
}
|
||||||
|
return localVarRequest, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||||
|
if len(b) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if s, ok := v.(*string); ok {
|
||||||
|
*s = string(b)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if f, ok := v.(*os.File); ok {
|
||||||
|
f, err = os.CreateTemp("", "HttpClientFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = f.Write(b)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = f.Seek(0, io.SeekStart)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if f, ok := v.(**os.File); ok {
|
||||||
|
*f, err = os.CreateTemp("", "HttpClientFile")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = (*f).Write(b)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = (*f).Seek(0, io.SeekStart)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if XmlCheck.MatchString(contentType) {
|
||||||
|
if err = xml.Unmarshal(b, v); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if JsonCheck.MatchString(contentType) {
|
||||||
|
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||||
|
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||||
|
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||||
|
}
|
||||||
|
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return errors.New("undefined response type")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a file to the multipart request
|
||||||
|
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||||
|
file, err := os.Open(filepath.Clean(path))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
err = file.Close()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = io.Copy(part, file)
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set request body from an interface{}
|
||||||
|
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||||
|
if bodyBuf == nil {
|
||||||
|
bodyBuf = &bytes.Buffer{}
|
||||||
|
}
|
||||||
|
|
||||||
|
if reader, ok := body.(io.Reader); ok {
|
||||||
|
_, err = bodyBuf.ReadFrom(reader)
|
||||||
|
} else if fp, ok := body.(*os.File); ok {
|
||||||
|
_, err = bodyBuf.ReadFrom(fp)
|
||||||
|
} else if b, ok := body.([]byte); ok {
|
||||||
|
_, err = bodyBuf.Write(b)
|
||||||
|
} else if s, ok := body.(string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(s)
|
||||||
|
} else if s, ok := body.(*string); ok {
|
||||||
|
_, err = bodyBuf.WriteString(*s)
|
||||||
|
} else if JsonCheck.MatchString(contentType) {
|
||||||
|
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||||
|
} else if XmlCheck.MatchString(contentType) {
|
||||||
|
var bs []byte
|
||||||
|
bs, err = xml.Marshal(body)
|
||||||
|
if err == nil {
|
||||||
|
bodyBuf.Write(bs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if bodyBuf.Len() == 0 {
|
||||||
|
err = fmt.Errorf("invalid body type %s\n", contentType)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return bodyBuf, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||||
|
func detectContentType(body interface{}) string {
|
||||||
|
contentType := "text/plain; charset=utf-8"
|
||||||
|
kind := reflect.TypeOf(body).Kind()
|
||||||
|
|
||||||
|
switch kind {
|
||||||
|
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
case reflect.String:
|
||||||
|
contentType = "text/plain; charset=utf-8"
|
||||||
|
default:
|
||||||
|
if b, ok := body.([]byte); ok {
|
||||||
|
contentType = http.DetectContentType(b)
|
||||||
|
} else if kind == reflect.Slice {
|
||||||
|
contentType = "application/json; charset=utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return contentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||||
|
type cacheControl map[string]string
|
||||||
|
|
||||||
|
func parseCacheControl(headers http.Header) cacheControl {
|
||||||
|
cc := cacheControl{}
|
||||||
|
ccHeader := headers.Get("Cache-Control")
|
||||||
|
for _, part := range strings.Split(ccHeader, ",") {
|
||||||
|
part = strings.Trim(part, " ")
|
||||||
|
if part == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if strings.ContainsRune(part, '=') {
|
||||||
|
keyval := strings.Split(part, "=")
|
||||||
|
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||||
|
} else {
|
||||||
|
cc[part] = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cc
|
||||||
|
}
|
||||||
|
|
||||||
|
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||||
|
func CacheExpires(r *http.Response) time.Time {
|
||||||
|
// Figure out when the cache expires.
|
||||||
|
var expires time.Time
|
||||||
|
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||||
|
if err != nil {
|
||||||
|
return time.Now()
|
||||||
|
}
|
||||||
|
respCacheControl := parseCacheControl(r.Header)
|
||||||
|
|
||||||
|
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||||
|
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||||
|
if err != nil {
|
||||||
|
expires = now
|
||||||
|
} else {
|
||||||
|
expires = now.Add(lifetime)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
expiresHeader := r.Header.Get("Expires")
|
||||||
|
if expiresHeader != "" {
|
||||||
|
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||||
|
if err != nil {
|
||||||
|
expires = now
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return expires
|
||||||
|
}
|
||||||
|
|
||||||
|
func strlen(s string) int {
|
||||||
|
return utf8.RuneCountInString(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
|
||||||
|
type GenericOpenAPIError struct {
|
||||||
|
body []byte
|
||||||
|
error string
|
||||||
|
model interface{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Error returns non-empty string if there was an error.
|
||||||
|
func (e GenericOpenAPIError) Error() string {
|
||||||
|
return e.error
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body returns the raw bytes of the response
|
||||||
|
func (e GenericOpenAPIError) Body() []byte {
|
||||||
|
return e.body
|
||||||
|
}
|
||||||
|
|
||||||
|
// Model returns the unpacked model of the error
|
||||||
|
func (e GenericOpenAPIError) Model() interface{} {
|
||||||
|
return e.model
|
||||||
|
}
|
||||||
|
|
||||||
|
// format error message using title and detail when model implements rfc7807
|
||||||
|
func formatErrorMessage(status string, v interface{}) string {
|
||||||
|
str := ""
|
||||||
|
metaValue := reflect.ValueOf(v).Elem()
|
||||||
|
|
||||||
|
if metaValue.Kind() == reflect.Struct {
|
||||||
|
field := metaValue.FieldByName("Title")
|
||||||
|
if field != (reflect.Value{}) {
|
||||||
|
str = fmt.Sprintf("%s", field.Interface())
|
||||||
|
}
|
||||||
|
|
||||||
|
field = metaValue.FieldByName("Detail")
|
||||||
|
if field != (reflect.Value{}) {
|
||||||
|
str = fmt.Sprintf("%s (%s)", str, field.Interface())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
|
||||||
|
}
|
|
@ -0,0 +1,229 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// contextKeys are used to identify the type of value in the context.
|
||||||
|
// Since these are string, it is possible to get a short description of the
|
||||||
|
// context key for logging and debugging using key.String().
|
||||||
|
|
||||||
|
type contextKey string
|
||||||
|
|
||||||
|
func (c contextKey) String() string {
|
||||||
|
return "auth " + string(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
// ContextServerIndex uses a server configuration from the index.
|
||||||
|
ContextServerIndex = contextKey("serverIndex")
|
||||||
|
|
||||||
|
// ContextOperationServerIndices uses a server configuration from the index mapping.
|
||||||
|
ContextOperationServerIndices = contextKey("serverOperationIndices")
|
||||||
|
|
||||||
|
// ContextServerVariables overrides a server configuration variables.
|
||||||
|
ContextServerVariables = contextKey("serverVariables")
|
||||||
|
|
||||||
|
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
|
||||||
|
ContextOperationServerVariables = contextKey("serverOperationVariables")
|
||||||
|
)
|
||||||
|
|
||||||
|
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
|
||||||
|
type BasicAuth struct {
|
||||||
|
UserName string `json:"userName,omitempty"`
|
||||||
|
Password string `json:"password,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
|
||||||
|
type APIKey struct {
|
||||||
|
Key string
|
||||||
|
Prefix string
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerVariable stores the information about a server variable
|
||||||
|
type ServerVariable struct {
|
||||||
|
Description string
|
||||||
|
DefaultValue string
|
||||||
|
EnumValues []string
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerConfiguration stores the information about a server
|
||||||
|
type ServerConfiguration struct {
|
||||||
|
URL string
|
||||||
|
Description string
|
||||||
|
Variables map[string]ServerVariable
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerConfigurations stores multiple ServerConfiguration items
|
||||||
|
type ServerConfigurations []ServerConfiguration
|
||||||
|
|
||||||
|
// Configuration stores the configuration of the API client
|
||||||
|
type Configuration struct {
|
||||||
|
Host string `json:"host,omitempty"`
|
||||||
|
Scheme string `json:"scheme,omitempty"`
|
||||||
|
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||||
|
UserAgent string `json:"userAgent,omitempty"`
|
||||||
|
Debug bool `json:"debug,omitempty"`
|
||||||
|
Servers ServerConfigurations
|
||||||
|
OperationServers map[string]ServerConfigurations
|
||||||
|
HTTPClient *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewConfiguration returns a new Configuration object
|
||||||
|
func NewConfiguration() *Configuration {
|
||||||
|
cfg := &Configuration{
|
||||||
|
DefaultHeader: make(map[string]string),
|
||||||
|
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||||
|
Debug: false,
|
||||||
|
Servers: ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: "",
|
||||||
|
Description: "No description provided",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
OperationServers: map[string]ServerConfigurations{},
|
||||||
|
}
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||||
|
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||||
|
c.DefaultHeader[key] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
// URL formats template on a index using given variables
|
||||||
|
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
|
||||||
|
if index < 0 || len(sc) <= index {
|
||||||
|
return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1)
|
||||||
|
}
|
||||||
|
server := sc[index]
|
||||||
|
url := server.URL
|
||||||
|
|
||||||
|
// go through variables and replace placeholders
|
||||||
|
for name, variable := range server.Variables {
|
||||||
|
if value, ok := variables[name]; ok {
|
||||||
|
found := bool(len(variable.EnumValues) == 0)
|
||||||
|
for _, enumValue := range variable.EnumValues {
|
||||||
|
if value == enumValue {
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
|
||||||
|
}
|
||||||
|
url = strings.Replace(url, "{"+name+"}", value, -1)
|
||||||
|
} else {
|
||||||
|
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return url, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerURL returns URL based on server settings
|
||||||
|
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
|
||||||
|
return c.Servers.URL(index, variables)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getServerIndex(ctx context.Context) (int, error) {
|
||||||
|
si := ctx.Value(ContextServerIndex)
|
||||||
|
if si != nil {
|
||||||
|
if index, ok := si.(int); ok {
|
||||||
|
return index, nil
|
||||||
|
}
|
||||||
|
return 0, reportError("Invalid type %T should be int", si)
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
|
||||||
|
osi := ctx.Value(ContextOperationServerIndices)
|
||||||
|
if osi != nil {
|
||||||
|
if operationIndices, ok := osi.(map[string]int); !ok {
|
||||||
|
return 0, reportError("Invalid type %T should be map[string]int", osi)
|
||||||
|
} else {
|
||||||
|
index, ok := operationIndices[endpoint]
|
||||||
|
if ok {
|
||||||
|
return index, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getServerIndex(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getServerVariables(ctx context.Context) (map[string]string, error) {
|
||||||
|
sv := ctx.Value(ContextServerVariables)
|
||||||
|
if sv != nil {
|
||||||
|
if variables, ok := sv.(map[string]string); ok {
|
||||||
|
return variables, nil
|
||||||
|
}
|
||||||
|
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
|
||||||
|
osv := ctx.Value(ContextOperationServerVariables)
|
||||||
|
if osv != nil {
|
||||||
|
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
|
||||||
|
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
|
||||||
|
} else {
|
||||||
|
variables, ok := operationVariables[endpoint]
|
||||||
|
if ok {
|
||||||
|
return variables, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getServerVariables(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerURLWithContext returns a new server URL given an endpoint
|
||||||
|
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
|
||||||
|
sc, ok := c.OperationServers[endpoint]
|
||||||
|
if !ok {
|
||||||
|
sc = c.Servers
|
||||||
|
}
|
||||||
|
|
||||||
|
if ctx == nil {
|
||||||
|
return sc.URL(0, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
index, err := getServerOperationIndex(ctx, endpoint)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
variables, err := getServerOperationVariables(ctx, endpoint)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
return sc.URL(index, variables)
|
||||||
|
}
|
|
@ -0,0 +1,746 @@
|
||||||
|
# \AnalyticsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**ContextMetrics**](AnalyticsAPI.md#ContextMetrics) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetrics | Get context metrics for a specific gamePk.
|
||||||
|
[**ContextMetricsWithAverages**](AnalyticsAPI.md#ContextMetricsWithAverages) | **Get** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
[**ContextMetricsWithAveragesPost**](AnalyticsAPI.md#ContextMetricsWithAveragesPost) | **Post** /api/v1/game/{gamePk}/{guid}/contextMetricsAverages | Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
[**GameGuids**](AnalyticsAPI.md#GameGuids) | **Get** /api/v1/game/{gamePk}/guids | Get the GUIDs (plays) for a specific game.
|
||||||
|
[**GameGuidsFromPostgresRange**](AnalyticsAPI.md#GameGuidsFromPostgresRange) | **Get** /api/v1/analytics/guids | Get the GUIDs (plays) for a specific game.
|
||||||
|
[**GameGuidsFromPostgresRangeByGame**](AnalyticsAPI.md#GameGuidsFromPostgresRangeByGame) | **Get** /api/v1/analytics/game | Get all games by updated date.
|
||||||
|
[**GameLastPitch**](AnalyticsAPI.md#GameLastPitch) | **Get** /api/v1/game/lastPitch | Get the last pitch for a list of games
|
||||||
|
[**HomeRunBallparks**](AnalyticsAPI.md#HomeRunBallparks) | **Get** /api/v1/game/{gamePk}/{guid}/homeRunBallparks | Get if the play is a home run is each park for a specific play.
|
||||||
|
[**ParsedJsonFormattedAnalytics**](AnalyticsAPI.md#ParsedJsonFormattedAnalytics) | **Get** /api/v1/game/{gamePk}/{guid}/analytics | Get Statcast data for a specific play.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## ContextMetrics
|
||||||
|
|
||||||
|
> ContextMetrics(ctx, gamePk, guid).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get context metrics for a specific gamePk.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
guid := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.ContextMetrics(context.Background(), gamePk, guid).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetrics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**guid** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiContextMetricsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## ContextMetricsWithAverages
|
||||||
|
|
||||||
|
> ContextMetricsWithAverages(ctx, gamePk, guid).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
guid := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.ContextMetricsWithAverages(context.Background(), gamePk, guid).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetricsWithAverages``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**guid** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiContextMetricsWithAveragesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## ContextMetricsWithAveragesPost
|
||||||
|
|
||||||
|
> ContextMetricsWithAveragesPost(ctx, gamePk, guid).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get a json file containing raw coordinate data and refined calculated metrics.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
guid := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.ContextMetricsWithAveragesPost(context.Background(), gamePk, guid).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ContextMetricsWithAveragesPost``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**guid** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiContextMetricsWithAveragesPostRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GameGuids
|
||||||
|
|
||||||
|
> GameGuids(ctx, gamePk).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).HasUpdates(hasUpdates).Since(since).UpdatedSince(updatedSince).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).Execute()
|
||||||
|
|
||||||
|
Get the GUIDs (plays) for a specific game.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
|
||||||
|
isPitch := TODO // interface{} | If there was a pitch (optional)
|
||||||
|
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
|
||||||
|
isPickoff := TODO // interface{} | If there was a pickoff (optional)
|
||||||
|
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
|
||||||
|
since := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
updatedSince := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.GameGuids(context.Background(), gamePk).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).HasUpdates(hasUpdates).Since(since).UpdatedSince(updatedSince).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuids``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGameGuidsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**gameModeId** | [**interface{}**](interface{}.md) | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live |
|
||||||
|
**isPitch** | [**interface{}**](interface{}.md) | If there was a pitch |
|
||||||
|
**isHit** | [**interface{}**](interface{}.md) | If there was a hit ball tracked |
|
||||||
|
**isPickoff** | [**interface{}**](interface{}.md) | If there was a pickoff |
|
||||||
|
**hasUpdates** | [**interface{}**](interface{}.md) | True if updated by an auditor |
|
||||||
|
**since** | [**interface{}**](interface{}.md) | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**updatedSince** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastPlayTime** | [**interface{}**](interface{}.md) | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastMetricsUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastAuditUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastVideoUpdatedTime** | [**interface{}**](interface{}.md) | The last time SportyBot video was updated |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GameGuidsFromPostgresRange
|
||||||
|
|
||||||
|
> GameGuidsFromPostgresRange(ctx).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).TrackingSystemOwner(trackingSystemOwner).Season(season).SortBy(sortBy).Limit(limit).Offset(offset).Execute()
|
||||||
|
|
||||||
|
Get the GUIDs (plays) for a specific game.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
|
||||||
|
isPitch := TODO // interface{} | If there was a pitch (optional)
|
||||||
|
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
|
||||||
|
isPickoff := TODO // interface{} | If there was a pickoff (optional)
|
||||||
|
isNonStatcast := TODO // interface{} | If non statcast games need to be included (optional)
|
||||||
|
gamedayType := TODO // interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) (optional)
|
||||||
|
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
|
||||||
|
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
|
||||||
|
gameDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
trackingSystemOwner := TODO // interface{} | Owner of the tracking system (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRange(context.Background()).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).LastVideoUpdatedTime(lastVideoUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).TrackingSystemOwner(trackingSystemOwner).Season(season).SortBy(sortBy).Limit(limit).Offset(offset).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuidsFromPostgresRange``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGameGuidsFromPostgresRangeRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**gameModeId** | [**interface{}**](interface{}.md) | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live |
|
||||||
|
**isPitch** | [**interface{}**](interface{}.md) | If there was a pitch |
|
||||||
|
**isHit** | [**interface{}**](interface{}.md) | If there was a hit ball tracked |
|
||||||
|
**isPickoff** | [**interface{}**](interface{}.md) | If there was a pickoff |
|
||||||
|
**isNonStatcast** | [**interface{}**](interface{}.md) | If non statcast games need to be included |
|
||||||
|
**gamedayType** | [**interface{}**](interface{}.md) | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) |
|
||||||
|
**hasUpdates** | [**interface{}**](interface{}.md) | True if updated by an auditor |
|
||||||
|
**lastPlayTime** | [**interface{}**](interface{}.md) | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastMetricsUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastAuditUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastVideoUpdatedTime** | [**interface{}**](interface{}.md) | The last time SportyBot video was updated |
|
||||||
|
**gameDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**trackingSystemOwner** | [**interface{}**](interface{}.md) | Owner of the tracking system |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GameGuidsFromPostgresRangeByGame
|
||||||
|
|
||||||
|
> GameGuidsFromPostgresRangeByGame(ctx).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastVideoUpdatedTime(lastVideoUpdatedTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).Season(season).TrackingSystemOwner(trackingSystemOwner).SortBy(sortBy).Limit(limit).Offset(offset).ScheduleEventTypes(scheduleEventTypes).Execute()
|
||||||
|
|
||||||
|
Get all games by updated date.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
gameModeId := TODO // interface{} | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live (optional)
|
||||||
|
isPitch := TODO // interface{} | If there was a pitch (optional)
|
||||||
|
isHit := TODO // interface{} | If there was a hit ball tracked (optional)
|
||||||
|
isPickoff := TODO // interface{} | If there was a pickoff (optional)
|
||||||
|
isNonStatcast := TODO // interface{} | If non statcast games need to be included (optional)
|
||||||
|
gamedayType := TODO // interface{} | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) (optional)
|
||||||
|
hasUpdates := TODO // interface{} | True if updated by an auditor (optional)
|
||||||
|
lastPlayTime := TODO // interface{} | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastVideoUpdatedTime := TODO // interface{} | The last time SportyBot video was updated (optional)
|
||||||
|
lastUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastMetricsUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
lastAuditUpdatedTime := TODO // interface{} | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
gameDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
trackingSystemOwner := TODO // interface{} | Owner of the tracking system (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
scheduleEventTypes := TODO // interface{} | Comma delimited list of type of event types (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRangeByGame(context.Background()).Fields(fields).GameModeId(gameModeId).IsPitch(isPitch).IsHit(isHit).IsPickoff(isPickoff).IsNonStatcast(isNonStatcast).GamedayType(gamedayType).HasUpdates(hasUpdates).LastPlayTime(lastPlayTime).LastVideoUpdatedTime(lastVideoUpdatedTime).LastUpdatedTime(lastUpdatedTime).LastMetricsUpdatedTime(lastMetricsUpdatedTime).LastAuditUpdatedTime(lastAuditUpdatedTime).GameDate(gameDate).SportId(sportId).GameType(gameType).Season(season).TrackingSystemOwner(trackingSystemOwner).SortBy(sortBy).Limit(limit).Offset(offset).ScheduleEventTypes(scheduleEventTypes).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameGuidsFromPostgresRangeByGame``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGameGuidsFromPostgresRangeByGameRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**gameModeId** | [**interface{}**](interface{}.md) | Statcast game mode. Format: 0 = Batting Practive, 1 = Warmup 2 = Live |
|
||||||
|
**isPitch** | [**interface{}**](interface{}.md) | If there was a pitch |
|
||||||
|
**isHit** | [**interface{}**](interface{}.md) | If there was a hit ball tracked |
|
||||||
|
**isPickoff** | [**interface{}**](interface{}.md) | If there was a pickoff |
|
||||||
|
**isNonStatcast** | [**interface{}**](interface{}.md) | If non statcast games need to be included |
|
||||||
|
**gamedayType** | [**interface{}**](interface{}.md) | Indicates the level of Gameday (tracking, play-by-play, linescore, etc...) |
|
||||||
|
**hasUpdates** | [**interface{}**](interface{}.md) | True if updated by an auditor |
|
||||||
|
**lastPlayTime** | [**interface{}**](interface{}.md) | Returns all data that was created after the specified timestamp. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastVideoUpdatedTime** | [**interface{}**](interface{}.md) | The last time SportyBot video was updated |
|
||||||
|
**lastUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastMetricsUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**lastAuditUpdatedTime** | [**interface{}**](interface{}.md) | Return data updated since a specified date. Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**gameDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**trackingSystemOwner** | [**interface{}**](interface{}.md) | Owner of the tracking system |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**scheduleEventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of event types |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GameLastPitch
|
||||||
|
|
||||||
|
> GameLastPitch(ctx).GamePks(gamePks).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the last pitch for a list of games
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePks := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.GameLastPitch(context.Background()).GamePks(gamePks).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.GameLastPitch``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGameLastPitchRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunBallparks
|
||||||
|
|
||||||
|
> HomeRunBallparks(ctx, gamePk, guid).IsHomeRunParks(isHomeRunParks).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get if the play is a home run is each park for a specific play.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
guid := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
isHomeRunParks := TODO // interface{} |
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.HomeRunBallparks(context.Background(), gamePk, guid).IsHomeRunParks(isHomeRunParks).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.HomeRunBallparks``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**guid** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunBallparksRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**isHomeRunParks** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## ParsedJsonFormattedAnalytics
|
||||||
|
|
||||||
|
> ParsedJsonFormattedAnalytics(ctx, gamePk, guid).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get Statcast data for a specific play.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
guid := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AnalyticsAPI.ParsedJsonFormattedAnalytics(context.Background(), gamePk, guid).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AnalyticsAPI.ParsedJsonFormattedAnalytics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**guid** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiParsedJsonFormattedAnalyticsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
# \AttendanceAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GetTeamAttendance**](AttendanceAPI.md#GetTeamAttendance) | **Get** /api/v1/attendance | Get team attendance
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GetTeamAttendance
|
||||||
|
|
||||||
|
> GetTeamAttendance(ctx).TeamId(teamId).LeagueId(leagueId).Season(season).LeagueListId(leagueListId).GameType(gameType).Date(date).StartDate(startDate).EndDate(endDate).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get team attendance
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AttendanceAPI.GetTeamAttendance(context.Background()).TeamId(teamId).LeagueId(leagueId).Season(season).LeagueListId(leagueListId).GameType(gameType).Date(date).StartDate(startDate).EndDate(endDate).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AttendanceAPI.GetTeamAttendance``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetTeamAttendanceRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,225 @@
|
||||||
|
# \AwardsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AwardRecipients**](AwardsAPI.md#AwardRecipients) | **Get** /api/v1/awards/{awardId}/recipients | View recipients of an award
|
||||||
|
[**Awards**](AwardsAPI.md#Awards) | **Get** /api/v1/awards | View awards info
|
||||||
|
[**Awards1**](AwardsAPI.md#Awards1) | **Get** /api/v1/awards/{awardId} | View awards info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AwardRecipients
|
||||||
|
|
||||||
|
> AwardRecipients(ctx, awardId).Season(season).SportId(sportId).LeagueId(leagueId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View recipients of an award
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
awardId := TODO // interface{} | Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
leagueId := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
fields := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AwardsAPI.AwardRecipients(context.Background(), awardId).Season(season).SportId(sportId).LeagueId(leagueId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AwardsAPI.AwardRecipients``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**awardId** | [**interface{}**](.md) | Unique Award Identifier. Available awards in /api/v1/awards |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAwardRecipientsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Awards
|
||||||
|
|
||||||
|
> Awards(ctx, awardId).OrgId(orgId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View awards info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
awardId := TODO // interface{} | Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
orgId := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AwardsAPI.Awards(context.Background(), awardId).OrgId(orgId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AwardsAPI.Awards``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**awardId** | [**interface{}**](.md) | Unique Award Identifier. Available awards in /api/v1/awards |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAwardsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**orgId** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Awards1
|
||||||
|
|
||||||
|
> Awards1(ctx, awardId).OrgId(orgId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View awards info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
awardId := TODO // interface{} | Unique Award Identifier. Available awards in /api/v1/awards
|
||||||
|
orgId := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.AwardsAPI.Awards1(context.Background(), awardId).OrgId(orgId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `AwardsAPI.Awards1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**awardId** | [**interface{}**](.md) | Unique Award Identifier. Available awards in /api/v1/awards |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAwards1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**orgId** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
# \BatTrackingAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**BatTracking**](BatTrackingAPI.md#BatTracking) | **Get** /api/v1/batTracking/game/{gamePk}/{playId} | View Bat Tracking Data by playId and gameId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## BatTracking
|
||||||
|
|
||||||
|
> BatTracking(ctx, gamePk, playId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Bat Tracking Data by playId and gameId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
playId := TODO // interface{} | Unique play identifier
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.BatTrackingAPI.BatTracking(context.Background(), gamePk, playId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `BatTrackingAPI.BatTracking``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**playId** | [**interface{}**](.md) | Unique play identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiBatTrackingRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
# \BiomechanicsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Biomechanical**](BiomechanicsAPI.md#Biomechanical) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/biomechanics/{positionId} | View Biomechanical data by playId and gameId filtered by player positionId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Biomechanical
|
||||||
|
|
||||||
|
> Biomechanical(ctx, gamePk, playId, positionId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Biomechanical data by playId and gameId filtered by player positionId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
playId := TODO // interface{} | Unique play identifier
|
||||||
|
positionId := TODO // interface{} | Position number. Format: 1, 2, 3, etc
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.BiomechanicsAPI.Biomechanical(context.Background(), gamePk, playId, positionId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `BiomechanicsAPI.Biomechanical``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**playId** | [**interface{}**](.md) | Unique play identifier |
|
||||||
|
**positionId** | [**interface{}**](.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiBiomechanicalRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,138 @@
|
||||||
|
# \BroadcastAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GetAllBroadcasters**](BroadcastAPI.md#GetAllBroadcasters) | **Get** /api/v1/broadcasters | Get All Active Broadcasters
|
||||||
|
[**GetBroadcasts**](BroadcastAPI.md#GetBroadcasts) | **Get** /api/v1/broadcast | Get Broadcasters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GetAllBroadcasters
|
||||||
|
|
||||||
|
> GetAllBroadcasters(ctx).ActiveStatus(activeStatus).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get All Active Broadcasters
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
activeStatus := TODO // interface{} | Current status of the broadcaster. Format: Active = y, inactive = n, both = b (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.BroadcastAPI.GetAllBroadcasters(context.Background()).ActiveStatus(activeStatus).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `BroadcastAPI.GetAllBroadcasters``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetAllBroadcastersRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Current status of the broadcaster. Format: Active = y, inactive = n, both = b |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetBroadcasts
|
||||||
|
|
||||||
|
> GetBroadcasts(ctx).BroadcasterIds(broadcasterIds).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get Broadcasters
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
broadcasterIds := TODO // interface{} | All of the broadcast details
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.BroadcastAPI.GetBroadcasts(context.Background()).BroadcasterIds(broadcasterIds).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `BroadcastAPI.GetBroadcasts``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetBroadcastsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**broadcasterIds** | [**interface{}**](interface{}.md) | All of the broadcast details |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
# \ConferenceAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Conferences**](ConferenceAPI.md#Conferences) | **Get** /api/v1/conferences | View conference info
|
||||||
|
[**Conferences1**](ConferenceAPI.md#Conferences1) | **Get** /api/v1/conferences/{conferenceId} | View conference info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Conferences
|
||||||
|
|
||||||
|
> Conferences(ctx, conferenceId).Season(season).IncludeInactive(includeInactive).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View conference info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
conferenceId := TODO // interface{} |
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
includeInactive := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ConferenceAPI.Conferences(context.Background(), conferenceId).Season(season).IncludeInactive(includeInactive).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ConferenceAPI.Conferences``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**conferenceId** | [**interface{}**](.md) | |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiConferencesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**includeInactive** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Conferences1
|
||||||
|
|
||||||
|
> Conferences1(ctx, conferenceId).Season(season).IncludeInactive(includeInactive).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View conference info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
conferenceId := TODO // interface{} |
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
includeInactive := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ConferenceAPI.Conferences1(context.Background(), conferenceId).Season(season).IncludeInactive(includeInactive).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ConferenceAPI.Conferences1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**conferenceId** | [**interface{}**](.md) | |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiConferences1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**includeInactive** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,166 @@
|
||||||
|
# \DivisionAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Divisions**](DivisionAPI.md#Divisions) | **Get** /api/v1/divisions | Get division information
|
||||||
|
[**Divisions1**](DivisionAPI.md#Divisions1) | **Get** /api/v1/divisions/{divisionId} | Get division information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Divisions
|
||||||
|
|
||||||
|
> Divisions(ctx, divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get division information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
divisionId := TODO // interface{} | Unique Division Identifier
|
||||||
|
includeInactive := TODO // interface{} | Whether or not to include inactive (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DivisionAPI.Divisions(context.Background(), divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DivisionAPI.Divisions``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**divisionId** | [**interface{}**](.md) | Unique Division Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDivisionsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**includeInactive** | [**interface{}**](interface{}.md) | Whether or not to include inactive |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Divisions1
|
||||||
|
|
||||||
|
> Divisions1(ctx, divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get division information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
divisionId := TODO // interface{} | Unique Division Identifier
|
||||||
|
includeInactive := TODO // interface{} | Whether or not to include inactive (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DivisionAPI.Divisions1(context.Background(), divisionId).IncludeInactive(includeInactive).LeagueId(leagueId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DivisionAPI.Divisions1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**divisionId** | [**interface{}**](.md) | Unique Division Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDivisions1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**includeInactive** | [**interface{}**](interface{}.md) | Whether or not to include inactive |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,473 @@
|
||||||
|
# \DraftAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**DraftPicks**](DraftAPI.md#DraftPicks) | **Get** /api/v1/draft | View MLB Drafted Players
|
||||||
|
[**DraftPicks1**](DraftAPI.md#DraftPicks1) | **Get** /api/v1/draft/{year} | View MLB Drafted Players
|
||||||
|
[**DraftProspects**](DraftAPI.md#DraftProspects) | **Get** /api/v1/draft/prospects | View MLB Draft Prospects
|
||||||
|
[**DraftProspects1**](DraftAPI.md#DraftProspects1) | **Get** /api/v1/draft/prospects/{year} | View MLB Draft Prospects
|
||||||
|
[**LatestDraftPicks**](DraftAPI.md#LatestDraftPicks) | **Get** /api/v1/draft/{year}/latest | Get the last drafted player and the next 5 teams up to pick
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## DraftPicks
|
||||||
|
|
||||||
|
> DraftPicks(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
|
||||||
|
View MLB Drafted Players
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
year := TODO // interface{} | Year the player was drafted. Format: 2000
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
|
||||||
|
round := TODO // interface{} | Round in which a player was drafted (optional)
|
||||||
|
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
|
||||||
|
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
|
||||||
|
country := TODO // interface{} | Filter players by their home country (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DraftAPI.DraftPicks(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftPicks``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDraftPicksRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
|
||||||
|
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
|
||||||
|
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
|
||||||
|
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
|
||||||
|
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## DraftPicks1
|
||||||
|
|
||||||
|
> DraftPicks1(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
|
||||||
|
View MLB Drafted Players
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
year := TODO // interface{} | Year the player was drafted. Format: 2000
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
|
||||||
|
round := TODO // interface{} | Round in which a player was drafted (optional)
|
||||||
|
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
|
||||||
|
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
|
||||||
|
country := TODO // interface{} | Filter players by their home country (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DraftAPI.DraftPicks1(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftPicks1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDraftPicks1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
|
||||||
|
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
|
||||||
|
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
|
||||||
|
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
|
||||||
|
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## DraftProspects
|
||||||
|
|
||||||
|
> DraftProspects(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
|
||||||
|
View MLB Draft Prospects
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
year := TODO // interface{} | Year the player was drafted. Format: 2000
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
|
||||||
|
round := TODO // interface{} | Round in which a player was drafted (optional)
|
||||||
|
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
|
||||||
|
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
|
||||||
|
country := TODO // interface{} | Filter players by their home country (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DraftAPI.DraftProspects(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftProspects``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDraftProspectsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
|
||||||
|
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
|
||||||
|
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
|
||||||
|
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
|
||||||
|
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## DraftProspects1
|
||||||
|
|
||||||
|
> DraftProspects1(ctx, year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
|
||||||
|
View MLB Draft Prospects
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
year := TODO // interface{} | Year the player was drafted. Format: 2000
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
sortBy := TODO // interface{} | Sort the set of data by the specified field (optional)
|
||||||
|
drafted := TODO // interface{} | Whether or not the players been drafted (optional)
|
||||||
|
round := TODO // interface{} | Round in which a player was drafted (optional)
|
||||||
|
name := TODO // interface{} | Filter players by the first letter of their name using using the specific character (optional)
|
||||||
|
school := TODO // interface{} | Filter players by the first letter of their school using using the specific character (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
team := TODO // interface{} | Unique Team Code. Format: tor, nya, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
state := TODO // interface{} | State where the venue is located. Format: Ohio (optional)
|
||||||
|
country := TODO // interface{} | Filter players by their home country (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
bisPlayerId := TODO // interface{} | A unique identifier for a player in the EBIS system (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DraftAPI.DraftProspects1(context.Background(), year).Limit(limit).Offset(offset).Fields(fields).Order(order).SortBy(sortBy).Drafted(drafted).Round(round).Name(name).School(school).Position(position).Team(team).TeamId(teamId).State(state).Country(country).PlayerId(playerId).BisPlayerId(bisPlayerId).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.DraftProspects1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDraftProspects1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**sortBy** | [**interface{}**](interface{}.md) | Sort the set of data by the specified field |
|
||||||
|
**drafted** | [**interface{}**](interface{}.md) | Whether or not the players been drafted |
|
||||||
|
**round** | [**interface{}**](interface{}.md) | Round in which a player was drafted |
|
||||||
|
**name** | [**interface{}**](interface{}.md) | Filter players by the first letter of their name using using the specific character |
|
||||||
|
**school** | [**interface{}**](interface{}.md) | Filter players by the first letter of their school using using the specific character |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**team** | [**interface{}**](interface{}.md) | Unique Team Code. Format: tor, nya, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**state** | [**interface{}**](interface{}.md) | State where the venue is located. Format: Ohio |
|
||||||
|
**country** | [**interface{}**](interface{}.md) | Filter players by their home country |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**bisPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for a player in the EBIS system |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LatestDraftPicks
|
||||||
|
|
||||||
|
> LatestDraftPicks(ctx, year).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the last drafted player and the next 5 teams up to pick
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
year := TODO // interface{} | Year the player was drafted. Format: 2000
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.DraftAPI.LatestDraftPicks(context.Background(), year).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `DraftAPI.LatestDraftPicks``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**year** | [**interface{}**](.md) | Year the player was drafted. Format: 2000 |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLatestDraftPicksRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,975 @@
|
||||||
|
# \GameAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Boxscore**](GameAPI.md#Boxscore) | **Get** /api/v1/game/{game_pk}/boxscore | Get game boxscore.
|
||||||
|
[**ColorFeed**](GameAPI.md#ColorFeed) | **Get** /api/v1/game/{game_pk}/feed/color | Get game color feed.
|
||||||
|
[**ColorTimestamps**](GameAPI.md#ColorTimestamps) | **Get** /api/v1/game/{game_pk}/feed/color/timestamps | Retrieve all of the color timestamps for a game.
|
||||||
|
[**Content**](GameAPI.md#Content) | **Get** /api/v1/game/{game_pk}/content | Retrieve all content for a game.
|
||||||
|
[**CurrentGameStats1**](GameAPI.md#CurrentGameStats1) | **Get** /api/v1/game/changes | View a game change log
|
||||||
|
[**GetGameContextMetrics**](GameAPI.md#GetGameContextMetrics) | **Get** /api/v1/game/{gamePk}/contextMetrics | Get the context metrics for this game based on its current state
|
||||||
|
[**GetGameWithMetrics**](GameAPI.md#GetGameWithMetrics) | **Get** /api/v1/game/{gamePk}/withMetrics | Get game info with metrics
|
||||||
|
[**GetWinProbability**](GameAPI.md#GetWinProbability) | **Get** /api/v1/game/{gamePk}/winProbability | Get the win probability for this game
|
||||||
|
[**Linescore**](GameAPI.md#Linescore) | **Get** /api/v1/game/{game_pk}/linescore | Get game linescore
|
||||||
|
[**LiveGameDiffPatchV1**](GameAPI.md#LiveGameDiffPatchV1) | **Get** /api/v1.1/game/{game_pk}/feed/live/diffPatch | Get live game status diffPatch.
|
||||||
|
[**LiveGameV1**](GameAPI.md#LiveGameV1) | **Get** /api/v1.1/game/{game_pk}/feed/live | Get live game status.
|
||||||
|
[**LiveTimestampv11**](GameAPI.md#LiveTimestampv11) | **Get** /api/v1.1/game/{game_pk}/feed/live/timestamps | Retrieve all of the play timestamps for a game.
|
||||||
|
[**PlayByPlay**](GameAPI.md#PlayByPlay) | **Get** /api/v1/game/{game_pk}/playByPlay | Get game play By Play
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Boxscore
|
||||||
|
|
||||||
|
> Boxscore(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).NumPlayers(numPlayers).NoTies(noTies).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get game boxscore.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
numPlayers := TODO // interface{} | Number of top player game scores to show. Default is 3. (optional)
|
||||||
|
noTies := TODO // interface{} | If set to false, will show all players tied for the last spot in the game scores list. (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.Boxscore(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).NumPlayers(numPlayers).NoTies(noTies).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Boxscore``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiBoxscoreRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
**numPlayers** | [**interface{}**](interface{}.md) | Number of top player game scores to show. Default is 3. |
|
||||||
|
**noTies** | [**interface{}**](interface{}.md) | If set to false, will show all players tied for the last spot in the game scores list. |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## ColorFeed
|
||||||
|
|
||||||
|
> ColorFeed(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get game color feed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.ColorFeed(context.Background(), gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.ColorFeed``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiColorFeedRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## ColorTimestamps
|
||||||
|
|
||||||
|
> ColorTimestamps(ctx, gamePk).Execute()
|
||||||
|
|
||||||
|
Retrieve all of the color timestamps for a game.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.ColorTimestamps(context.Background(), gamePk).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.ColorTimestamps``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiColorTimestampsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Content
|
||||||
|
|
||||||
|
> Content(ctx, gamePk).HighlightLimit(highlightLimit).Execute()
|
||||||
|
|
||||||
|
Retrieve all content for a game.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} |
|
||||||
|
highlightLimit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.Content(context.Background(), gamePk).HighlightLimit(highlightLimit).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Content``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiContentRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**highlightLimit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## CurrentGameStats1
|
||||||
|
|
||||||
|
> CurrentGameStats1(ctx).UpdatedSince(updatedSince).SportId(sportId).SportIds(sportIds).GameType(gameType).GameTypes(gameTypes).Season(season).GamePks(gamePks).Limit(limit).Offset(offset).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a game change log
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
updatedSince := TODO // interface{} | Format: YYYY-MM-DDTHH:MM:SSZ (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.CurrentGameStats1(context.Background()).UpdatedSince(updatedSince).SportId(sportId).SportIds(sportIds).GameType(gameType).GameTypes(gameTypes).Season(season).GamePks(gamePks).Limit(limit).Offset(offset).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.CurrentGameStats1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiCurrentGameStats1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**updatedSince** | [**interface{}**](interface{}.md) | Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetGameContextMetrics
|
||||||
|
|
||||||
|
> GetGameContextMetrics(ctx, gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the context metrics for this game based on its current state
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.GetGameContextMetrics(context.Background(), gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetGameContextMetrics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetGameContextMetricsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetGameWithMetrics
|
||||||
|
|
||||||
|
> GetGameWithMetrics(ctx, gamePk).Timecode(timecode).InclusiveTimecode(inclusiveTimecode).Fields(fields).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get game info with metrics
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.GetGameWithMetrics(context.Background(), gamePk).Timecode(timecode).InclusiveTimecode(inclusiveTimecode).Fields(fields).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetGameWithMetrics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetGameWithMetricsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetWinProbability
|
||||||
|
|
||||||
|
> GetWinProbability(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get the win probability for this game
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.GetWinProbability(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.GetWinProbability``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetWinProbabilityRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Linescore
|
||||||
|
|
||||||
|
> Linescore(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Execute()
|
||||||
|
|
||||||
|
Get game linescore
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.Linescore(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.Linescore``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLinescoreRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LiveGameDiffPatchV1
|
||||||
|
|
||||||
|
> LiveGameDiffPatchV1(ctx, gamePk).StartTimecode(startTimecode).EndTimecode(endTimecode).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get live game status diffPatch.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
startTimecode := TODO // interface{} | Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS (optional)
|
||||||
|
endTimecode := TODO // interface{} | End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.LiveGameDiffPatchV1(context.Background(), gamePk).StartTimecode(startTimecode).EndTimecode(endTimecode).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveGameDiffPatchV1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLiveGameDiffPatchV1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**startTimecode** | [**interface{}**](interface{}.md) | Start time code will give you everything since that time. Format: MMDDYYYY_HHMMSS |
|
||||||
|
**endTimecode** | [**interface{}**](interface{}.md) | End time code will give you a snapshot at that specific time. Format: MMDDYYYY_HHMMSS |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LiveGameV1
|
||||||
|
|
||||||
|
> LiveGameV1(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get live game status.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.LiveGameV1(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveGameV1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLiveGameV1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## LiveTimestampv11
|
||||||
|
|
||||||
|
> LiveTimestampv11(ctx, gamePk).Execute()
|
||||||
|
|
||||||
|
Retrieve all of the play timestamps for a game.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.LiveTimestampv11(context.Background(), gamePk).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.LiveTimestampv11``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLiveTimestampv11Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## PlayByPlay
|
||||||
|
|
||||||
|
> PlayByPlay(ctx, gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
|
||||||
|
Get game play By Play
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
inclusiveTimecode := TODO // interface{} | True to include plays that happen before or at the specified timecode (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GameAPI.PlayByPlay(context.Background(), gamePk).Timecode(timecode).Fields(fields).InclusiveTimecode(inclusiveTimecode).Accent(accent).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GameAPI.PlayByPlay``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPlayByPlayRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**inclusiveTimecode** | [**interface{}**](interface{}.md) | True to include plays that happen before or at the specified timecode |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
# \GamePaceAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GamePace**](GamePaceAPI.md#GamePace) | **Get** /api/v1/gamePace | View time of game info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GamePace
|
||||||
|
|
||||||
|
> GamePace(ctx).Season(season).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).SportId(sportId).SportIds(sportIds).GameType(gameType).StartDate(startDate).EndDate(endDate).VenueIds(venueIds).ExcludeVenueIds(excludeVenueIds).ExcludeGamePks(excludeGamePks).OrgType(orgType).IncludeChildren(includeChildren).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View time of game info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
venueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
|
||||||
|
excludeVenueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
|
||||||
|
excludeGamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
orgType := TODO // interface{} | Organization level. Format: T(Team), L(League), S(Sport) (optional)
|
||||||
|
includeChildren := TODO // interface{} | Determines weather to include results from an organization's children (ex. a sport would also include results for the teams and leagues) (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.GamePaceAPI.GamePace(context.Background()).Season(season).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).SportId(sportId).SportIds(sportIds).GameType(gameType).StartDate(startDate).EndDate(endDate).VenueIds(venueIds).ExcludeVenueIds(excludeVenueIds).ExcludeGamePks(excludeGamePks).OrgType(orgType).IncludeChildren(includeChildren).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `GamePaceAPI.GamePace``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGamePaceRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique venue identifiers |
|
||||||
|
**excludeVenueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique venue identifiers |
|
||||||
|
**excludeGamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**orgType** | [**interface{}**](interface{}.md) | Organization level. Format: T(Team), L(League), S(Sport) |
|
||||||
|
**includeChildren** | [**interface{}**](interface{}.md) | Determines weather to include results from an organization's children (ex. a sport would also include results for the teams and leagues) |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,153 @@
|
||||||
|
# \HighLowAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**HighLow**](HighLowAPI.md#HighLow) | **Get** /api/v1/highLow/{highLowType} | View high/low stats by player or team
|
||||||
|
[**HighLowStats**](HighLowAPI.md#HighLowStats) | **Get** /api/v1/highLow/types | View high/low stat types
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## HighLow
|
||||||
|
|
||||||
|
> HighLow(ctx, highLowType).StatGroup(statGroup).SortStat(sortStat).Season(season).GameType(gameType).TeamId(teamId).LeagueId(leagueId).SportId(sportId).Offset(offset).Limit(limit).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View high/low stats by player or team
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
highLowType := TODO // interface{} | Type of high/low stats ('player', 'team', 'game')
|
||||||
|
statGroup := TODO // interface{} | Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
sortStat := TODO // interface{} | Comma delimited list of baseball stats to sort splits by. (optional)
|
||||||
|
season := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
gameType := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HighLowAPI.HighLow(context.Background(), highLowType).StatGroup(statGroup).SortStat(sortStat).Season(season).GameType(gameType).TeamId(teamId).LeagueId(leagueId).SportId(sportId).Offset(offset).Limit(limit).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HighLowAPI.HighLow``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**highLowType** | [**interface{}**](.md) | Type of high/low stats ('player', 'team', 'game') |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHighLowRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**statGroup** | [**interface{}**](interface{}.md) | Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**sortStat** | [**interface{}**](interface{}.md) | Comma delimited list of baseball stats to sort splits by. |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HighLowStats
|
||||||
|
|
||||||
|
> HighLowStats(ctx).Execute()
|
||||||
|
|
||||||
|
View high/low stat types
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HighLowAPI.HighLowStats(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HighLowAPI.HighLowStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHighLowStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,576 @@
|
||||||
|
# \HomerunDerbyAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**HomeRunDerbyBracket**](HomerunDerbyAPI.md#HomeRunDerbyBracket) | **Get** /api/v1/homeRunDerby/{gamePk} | View a home run derby object
|
||||||
|
[**HomeRunDerbyBracket1**](HomerunDerbyAPI.md#HomeRunDerbyBracket1) | **Get** /api/v1/homeRunDerby | View a home run derby object
|
||||||
|
[**HomeRunDerbyBracket2**](HomerunDerbyAPI.md#HomeRunDerbyBracket2) | **Get** /api/v1/homeRunDerby/{gamePk}/bracket | View a home run derby object
|
||||||
|
[**HomeRunDerbyBracket3**](HomerunDerbyAPI.md#HomeRunDerbyBracket3) | **Get** /api/v1/homeRunDerby/bracket | View a home run derby object
|
||||||
|
[**HomeRunDerbyMixedMode**](HomerunDerbyAPI.md#HomeRunDerbyMixedMode) | **Get** /api/v1/homeRunDerby/{gamePk}/mixed | View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
[**HomeRunDerbyMixedMode1**](HomerunDerbyAPI.md#HomeRunDerbyMixedMode1) | **Get** /api/v1/homeRunDerby/mixed | View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
[**HomeRunDerbyPool**](HomerunDerbyAPI.md#HomeRunDerbyPool) | **Get** /api/v1/homeRunDerby/{gamePk}/pool | View home run derby pool
|
||||||
|
[**HomeRunDerbyPool1**](HomerunDerbyAPI.md#HomeRunDerbyPool1) | **Get** /api/v1/homeRunDerby/pool | View home run derby pool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyBracket
|
||||||
|
|
||||||
|
> HomeRunDerbyBracket(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a home run derby object
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyBracket``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyBracketRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyBracket1
|
||||||
|
|
||||||
|
> HomeRunDerbyBracket1(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a home run derby object
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket1(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyBracket1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyBracket1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyBracket2
|
||||||
|
|
||||||
|
> HomeRunDerbyBracket2(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a home run derby object
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket2(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyBracket2``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyBracket2Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyBracket3
|
||||||
|
|
||||||
|
> HomeRunDerbyBracket3(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a home run derby object
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket3(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyBracket3``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyBracket3Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyMixedMode
|
||||||
|
|
||||||
|
> HomeRunDerbyMixedMode(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyMixedMode(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyMixedMode``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyMixedModeRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyMixedMode1
|
||||||
|
|
||||||
|
> HomeRunDerbyMixedMode1(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View home run derby mixed mode (Bracket/Pool combo)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyMixedMode1(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyMixedMode1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyMixedMode1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyPool
|
||||||
|
|
||||||
|
> HomeRunDerbyPool(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View home run derby pool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyPool(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyPool``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyPoolRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## HomeRunDerbyPool1
|
||||||
|
|
||||||
|
> HomeRunDerbyPool1(ctx, gamePk).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View home run derby pool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.HomerunDerbyAPI.HomeRunDerbyPool1(context.Background(), gamePk).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `HomerunDerbyAPI.HomeRunDerbyPool1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiHomeRunDerbyPool1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,361 @@
|
||||||
|
# \JobAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Datacasters**](JobAPI.md#Datacasters) | **Get** /api/v1/jobs/datacasters | Get datacaster jobs
|
||||||
|
[**GetJobsByType**](JobAPI.md#GetJobsByType) | **Get** /api/v1/jobs | Get jobs by type
|
||||||
|
[**OfficialScorers**](JobAPI.md#OfficialScorers) | **Get** /api/v1/jobs/officialScorers | Get official scorers
|
||||||
|
[**UmpireSchedule**](JobAPI.md#UmpireSchedule) | **Get** /api/v1/jobs/umpires/games/{umpireId} | Get umpires and associated game for umpireId
|
||||||
|
[**Umpires**](JobAPI.md#Umpires) | **Get** /api/v1/jobs/umpires | Get umpires
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Datacasters
|
||||||
|
|
||||||
|
> Datacasters(ctx).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get datacaster jobs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.JobAPI.Datacasters(context.Background()).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `JobAPI.Datacasters``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiDatacastersRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetJobsByType
|
||||||
|
|
||||||
|
> GetJobsByType(ctx).JobType(jobType).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get jobs by type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
jobType := TODO // interface{} | Job Type Identifier (ie. UMPR, etc..)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.JobAPI.GetJobsByType(context.Background()).JobType(jobType).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `JobAPI.GetJobsByType``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetJobsByTypeRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**jobType** | [**interface{}**](interface{}.md) | Job Type Identifier (ie. UMPR, etc..) |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## OfficialScorers
|
||||||
|
|
||||||
|
> OfficialScorers(ctx).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get official scorers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.JobAPI.OfficialScorers(context.Background()).SportId(sportId).Date(date).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `JobAPI.OfficialScorers``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiOfficialScorersRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UmpireSchedule
|
||||||
|
|
||||||
|
> UmpireSchedule(ctx, umpireId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get umpires and associated game for umpireId
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
umpireId := TODO // interface{} | A unique identifier for an umpire
|
||||||
|
season := TODO // interface{} | Season of play
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.JobAPI.UmpireSchedule(context.Background(), umpireId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `JobAPI.UmpireSchedule``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**umpireId** | [**interface{}**](.md) | A unique identifier for an umpire |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiUmpireScheduleRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Umpires
|
||||||
|
|
||||||
|
> Umpires(ctx).SportId(sportId).Date(date).Fields(fields).Season(season).Execute()
|
||||||
|
|
||||||
|
Get umpires
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.JobAPI.Umpires(context.Background()).SportId(sportId).Date(date).Fields(fields).Season(season).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `JobAPI.Umpires``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiUmpiresRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,900 @@
|
||||||
|
# \LeagueAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AllStarBallot**](LeagueAPI.md#AllStarBallot) | **Get** /api/v1/league/allStarBallot | View al star ballot info
|
||||||
|
[**AllStarBallot1**](LeagueAPI.md#AllStarBallot1) | **Get** /api/v1/league/{leagueId}/allStarBallot | View al star ballot info
|
||||||
|
[**AllStarBallot2**](LeagueAPI.md#AllStarBallot2) | **Get** /api/v1/leagues/allStarBallot | View al star ballot info
|
||||||
|
[**AllStarBallot3**](LeagueAPI.md#AllStarBallot3) | **Get** /api/v1/leagues/{leagueId}/allStarBallot | View al star ballot info
|
||||||
|
[**AllStarFinalVote**](LeagueAPI.md#AllStarFinalVote) | **Get** /api/v1/league/{leagueId}/allStarFinalVote | View all star final vote info
|
||||||
|
[**AllStarFinalVote1**](LeagueAPI.md#AllStarFinalVote1) | **Get** /api/v1/leagues/{leagueId}/allStarFinalVote | View all star final vote info
|
||||||
|
[**AllStarWriteIns**](LeagueAPI.md#AllStarWriteIns) | **Get** /api/v1/league/{leagueId}/allStarWriteIns | View all star write ins info
|
||||||
|
[**AllStarWriteIns1**](LeagueAPI.md#AllStarWriteIns1) | **Get** /api/v1/leagues/{leagueId}/allStarWriteIns | View all star write ins info
|
||||||
|
[**League**](LeagueAPI.md#League) | **Get** /api/v1/league | View league info
|
||||||
|
[**League1**](LeagueAPI.md#League1) | **Get** /api/v1/league/{leagueId} | View league info
|
||||||
|
[**League2**](LeagueAPI.md#League2) | **Get** /api/v1/leagues | View league info
|
||||||
|
[**League3**](LeagueAPI.md#League3) | **Get** /api/v1/leagues/{leagueId} | View league info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarBallot
|
||||||
|
|
||||||
|
> AllStarBallot(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View al star ballot info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarBallot(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarBallotRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarBallot1
|
||||||
|
|
||||||
|
> AllStarBallot1(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View al star ballot info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarBallot1(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarBallot1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarBallot2
|
||||||
|
|
||||||
|
> AllStarBallot2(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View al star ballot info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarBallot2(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot2``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarBallot2Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarBallot3
|
||||||
|
|
||||||
|
> AllStarBallot3(ctx, leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View al star ballot info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarBallot3(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarBallot3``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarBallot3Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarFinalVote
|
||||||
|
|
||||||
|
> AllStarFinalVote(ctx, leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View all star final vote info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarFinalVote(context.Background(), leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarFinalVote``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarFinalVoteRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarFinalVote1
|
||||||
|
|
||||||
|
> AllStarFinalVote1(ctx, leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View all star final vote info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarFinalVote1(context.Background(), leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarFinalVote1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarFinalVote1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarWriteIns
|
||||||
|
|
||||||
|
> AllStarWriteIns(ctx, leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View all star write ins info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarWriteIns(context.Background(), leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarWriteIns``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarWriteInsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## AllStarWriteIns1
|
||||||
|
|
||||||
|
> AllStarWriteIns1(ctx, leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View all star write ins info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.AllStarWriteIns1(context.Background(), leagueId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.AllStarWriteIns1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllStarWriteIns1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## League
|
||||||
|
|
||||||
|
> League(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
View league info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.League(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLeagueRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## League1
|
||||||
|
|
||||||
|
> League1(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
View league info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.League1(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLeague1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## League2
|
||||||
|
|
||||||
|
> League2(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
View league info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.League2(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League2``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLeague2Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## League3
|
||||||
|
|
||||||
|
> League3(ctx, leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
View league info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.LeagueAPI.League3(context.Background(), leagueId).LeagueIds(leagueIds).Season(season).Seasons(seasons).Fields(fields).SportId(sportId).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `LeagueAPI.League3``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**leagueId** | [**interface{}**](.md) | Unique League Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLeague3Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching leagues that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,393 @@
|
||||||
|
# \MilestonesAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AchievementStatuses**](MilestonesAPI.md#AchievementStatuses) | **Get** /api/v1/achievementStatuses | View available achievementStatus options
|
||||||
|
[**MilestoneDurations**](MilestonesAPI.md#MilestoneDurations) | **Get** /api/v1/milestoneDurations | View available milestoneDurations options
|
||||||
|
[**MilestoneLookups**](MilestonesAPI.md#MilestoneLookups) | **Get** /api/v1/milestoneLookups | View available milestoneLookup options
|
||||||
|
[**MilestoneStatistics**](MilestonesAPI.md#MilestoneStatistics) | **Get** /api/v1/milestoneStatistics | View available milestone statistics options
|
||||||
|
[**MilestoneTypes**](MilestonesAPI.md#MilestoneTypes) | **Get** /api/v1/milestoneTypes | View available milestoneType options
|
||||||
|
[**Milestones**](MilestonesAPI.md#Milestones) | **Get** /api/v1/milestones | View pending and achieved milestones.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AchievementStatuses
|
||||||
|
|
||||||
|
> AchievementStatuses(ctx).Execute()
|
||||||
|
|
||||||
|
View available achievementStatus options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.AchievementStatuses(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.AchievementStatuses``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAchievementStatusesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## MilestoneDurations
|
||||||
|
|
||||||
|
> MilestoneDurations(ctx).Execute()
|
||||||
|
|
||||||
|
View available milestoneDurations options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.MilestoneDurations(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneDurations``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMilestoneDurationsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## MilestoneLookups
|
||||||
|
|
||||||
|
> MilestoneLookups(ctx).Execute()
|
||||||
|
|
||||||
|
View available milestoneLookup options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.MilestoneLookups(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneLookups``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMilestoneLookupsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## MilestoneStatistics
|
||||||
|
|
||||||
|
> MilestoneStatistics(ctx).Execute()
|
||||||
|
|
||||||
|
View available milestone statistics options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.MilestoneStatistics(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneStatistics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMilestoneStatisticsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## MilestoneTypes
|
||||||
|
|
||||||
|
> MilestoneTypes(ctx).Execute()
|
||||||
|
|
||||||
|
View available milestoneType options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.MilestoneTypes(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.MilestoneTypes``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMilestoneTypesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Milestones
|
||||||
|
|
||||||
|
> Milestones(ctx).OrgType(orgType).AchievementStatuses(achievementStatuses).MilestoneTypes(milestoneTypes).IsLastAchievement(isLastAchievement).MilestoneStatistics(milestoneStatistics).MilestoneValues(milestoneValues).PlayerIds(playerIds).TeamIds(teamIds).LeagueIds(leagueIds).StatGroup(statGroup).Season(season).Seasons(seasons).VenueIds(venueIds).GamePks(gamePks).Limit(limit).Fields(fields).ShowFirsts(showFirsts).Execute()
|
||||||
|
|
||||||
|
View pending and achieved milestones.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
orgType := TODO // interface{} | Organization level. Format: T(Team), L(League), S(Sport) (optional)
|
||||||
|
achievementStatuses := TODO // interface{} | Comma delimited list of milestone achievement types (optional)
|
||||||
|
milestoneTypes := TODO // interface{} | Comma delimited list of milestone types (optional)
|
||||||
|
isLastAchievement := TODO // interface{} | Filters out milestones that have already been surpassed. (optional)
|
||||||
|
milestoneStatistics := TODO // interface{} | Comma delimited list of milestone statistics (optional)
|
||||||
|
milestoneValues := TODO // interface{} | Comma delimited list of milestone values (optional)
|
||||||
|
playerIds := TODO // interface{} | A unique identifier for players (optional)
|
||||||
|
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
statGroup := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
venueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
showFirsts := TODO // interface{} | True to show play first milestones, like first HR, first Save, etc (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.MilestonesAPI.Milestones(context.Background()).OrgType(orgType).AchievementStatuses(achievementStatuses).MilestoneTypes(milestoneTypes).IsLastAchievement(isLastAchievement).MilestoneStatistics(milestoneStatistics).MilestoneValues(milestoneValues).PlayerIds(playerIds).TeamIds(teamIds).LeagueIds(leagueIds).StatGroup(statGroup).Season(season).Seasons(seasons).VenueIds(venueIds).GamePks(gamePks).Limit(limit).Fields(fields).ShowFirsts(showFirsts).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `MilestonesAPI.Milestones``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMilestonesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**orgType** | [**interface{}**](interface{}.md) | Organization level. Format: T(Team), L(League), S(Sport) |
|
||||||
|
**achievementStatuses** | [**interface{}**](interface{}.md) | Comma delimited list of milestone achievement types |
|
||||||
|
**milestoneTypes** | [**interface{}**](interface{}.md) | Comma delimited list of milestone types |
|
||||||
|
**isLastAchievement** | [**interface{}**](interface{}.md) | Filters out milestones that have already been surpassed. |
|
||||||
|
**milestoneStatistics** | [**interface{}**](interface{}.md) | Comma delimited list of milestone statistics |
|
||||||
|
**milestoneValues** | [**interface{}**](interface{}.md) | Comma delimited list of milestone values |
|
||||||
|
**playerIds** | [**interface{}**](interface{}.md) | A unique identifier for players |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**statGroup** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique venue identifiers |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**showFirsts** | [**interface{}**](interface{}.md) | True to show play first milestones, like first HR, first Save, etc |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,770 @@
|
||||||
|
# \PersonAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Award**](PersonAPI.md#Award) | **Get** /api/v1/people/{personId}/awards | View a player's awards
|
||||||
|
[**CurrentGameStats**](PersonAPI.md#CurrentGameStats) | **Get** /api/v1/people/changes | View a player's change log
|
||||||
|
[**FreeAgents**](PersonAPI.md#FreeAgents) | **Get** /api/v1/people/freeAgents | Get free agents
|
||||||
|
[**Person**](PersonAPI.md#Person) | **Get** /api/v1/people/{personId} | View a player
|
||||||
|
[**Person1**](PersonAPI.md#Person1) | **Get** /api/v1/people | View a player
|
||||||
|
[**PlayerGameStats**](PersonAPI.md#PlayerGameStats) | **Get** /api/v1/people/{personId}/stats/game/{gamePk} | View a player's game stats
|
||||||
|
[**Search**](PersonAPI.md#Search) | **Get** /api/v1/people/search | Search for a player by name
|
||||||
|
[**Stats3**](PersonAPI.md#Stats3) | **Get** /api/v1/people/{personId}/stats | View a players stats
|
||||||
|
[**StatsMetrics**](PersonAPI.md#StatsMetrics) | **Get** /api/v1/people/{personId}/stats/metrics | View a player's stat metrics
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Award
|
||||||
|
|
||||||
|
> Award(ctx, personId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player's awards
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.Award(context.Background(), personId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Award``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAwardRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## CurrentGameStats
|
||||||
|
|
||||||
|
> CurrentGameStats(ctx).UpdatedSince(updatedSince).Limit(limit).Offset(offset).Accent(accent).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player's change log
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
updatedSince := TODO // interface{} | Format: YYYY-MM-DDTHH:MM:SSZ
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.CurrentGameStats(context.Background()).UpdatedSince(updatedSince).Limit(limit).Offset(offset).Accent(accent).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.CurrentGameStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiCurrentGameStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**updatedSince** | [**interface{}**](interface{}.md) | Format: YYYY-MM-DDTHH:MM:SSZ |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## FreeAgents
|
||||||
|
|
||||||
|
> FreeAgents(ctx).Season(season).Order(order).Accent(accent).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get free agents
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
season := TODO // interface{} | Season of play
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
fields := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.FreeAgents(context.Background()).Season(season).Order(order).Accent(accent).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.FreeAgents``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiFreeAgentsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Person
|
||||||
|
|
||||||
|
> Person(ctx, personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.Person(context.Background(), personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Person``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPersonRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Person1
|
||||||
|
|
||||||
|
> Person1(ctx, personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.Person1(context.Background(), personId).PersonIds(personIds).Accent(accent).Season(season).Group(group).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Person1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPerson1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## PlayerGameStats
|
||||||
|
|
||||||
|
> PlayerGameStats(ctx, personId, gamePk).Group(group).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player's game stats
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.PlayerGameStats(context.Background(), personId, gamePk).Group(group).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.PlayerGameStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPlayerGameStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Search
|
||||||
|
|
||||||
|
> Search(ctx).Names(names).PersonIds(personIds).SportIds(sportIds).LeagueIds(leagueIds).TeamIds(teamIds).LeagueListId(leagueListId).Active(active).Verified(verified).Rookie(rookie).Seasons(seasons).Fields(fields).Accent(accent).Limit(limit).Execute()
|
||||||
|
|
||||||
|
Search for a player by name
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
names := TODO // interface{} | Name a player uses (optional)
|
||||||
|
personIds := TODO // interface{} | Comma delimited list of person ID. Format: 1234, 2345 (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
active := TODO // interface{} | Whether or not a player is active (optional)
|
||||||
|
verified := TODO // interface{} | Complete and confirmed all biographical data (optional)
|
||||||
|
rookie := TODO // interface{} | Whether or not a player is a rookie (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.Search(context.Background()).Names(names).PersonIds(personIds).SportIds(sportIds).LeagueIds(leagueIds).TeamIds(teamIds).LeagueListId(leagueListId).Active(active).Verified(verified).Rookie(rookie).Seasons(seasons).Fields(fields).Accent(accent).Limit(limit).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Search``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSearchRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**names** | [**interface{}**](interface{}.md) | Name a player uses |
|
||||||
|
**personIds** | [**interface{}**](interface{}.md) | Comma delimited list of person ID. Format: 1234, 2345 |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**active** | [**interface{}**](interface{}.md) | Whether or not a player is active |
|
||||||
|
**verified** | [**interface{}**](interface{}.md) | Complete and confirmed all biographical data |
|
||||||
|
**rookie** | [**interface{}**](interface{}.md) | Whether or not a player is a rookie |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Stats3
|
||||||
|
|
||||||
|
> Stats3(ctx, personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a players stats
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
opposingPlayerId := TODO // interface{} | A unique identifier for the opposing team (optional)
|
||||||
|
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
|
||||||
|
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
|
||||||
|
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
eventType := TODO // interface{} | Type of event (optional)
|
||||||
|
pitchType := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
|
||||||
|
hitTrajectory := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
|
||||||
|
batSide := TODO // interface{} | Bat side of hitter (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.Stats3(context.Background(), personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.Stats3``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStats3Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**opposingPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team |
|
||||||
|
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
|
||||||
|
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
|
||||||
|
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**eventType** | [**interface{}**](interface{}.md) | Type of event |
|
||||||
|
**pitchType** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
|
||||||
|
**hitTrajectory** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
|
||||||
|
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## StatsMetrics
|
||||||
|
|
||||||
|
> StatsMetrics(ctx, personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View a player's stat metrics
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc
|
||||||
|
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
opposingPlayerId := TODO // interface{} | A unique identifier for the opposing team (optional)
|
||||||
|
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
|
||||||
|
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
|
||||||
|
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
eventType := TODO // interface{} | Type of event (optional)
|
||||||
|
pitchType := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
|
||||||
|
hitTrajectory := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
|
||||||
|
batSide := TODO // interface{} | Bat side of hitter (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PersonAPI.StatsMetrics(context.Background(), personId).Stats(stats).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Metrics(metrics).LeagueId(leagueId).LeagueListId(leagueListId).SitCodes(sitCodes).CombineSits(combineSits).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).Limit(limit).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).GameType(gameType).GroupBy(groupBy).Accent(accent).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonAPI.StatsMetrics``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**personId** | [**interface{}**](.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStatsMetricsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**opposingPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team |
|
||||||
|
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
|
||||||
|
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
|
||||||
|
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**eventType** | [**interface{}**](interface{}.md) | Type of event |
|
||||||
|
**pitchType** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
|
||||||
|
**hitTrajectory** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
|
||||||
|
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,150 @@
|
||||||
|
# \PredictionsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GetProps**](PredictionsAPI.md#GetProps) | **Get** /api/v1/props/play/predictions | Get play-level predictions based on input scenarios
|
||||||
|
[**GetPropsAdjust**](PredictionsAPI.md#GetPropsAdjust) | **Get** /api/v1/props/play/predictions/adjust | Get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GetProps
|
||||||
|
|
||||||
|
> GetProps(ctx).BatterId(batterId).PitcherId(pitcherId).VenueId(venueId).BatSide(batSide).PitchHand(pitchHand).BatterPosition(batterPosition).PitcherPosition(pitcherPosition).Execute()
|
||||||
|
|
||||||
|
Get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
venueId := TODO // interface{} | Unique Venue Identifier (optional)
|
||||||
|
batSide := TODO // interface{} | Bat side of hitter (optional)
|
||||||
|
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
|
||||||
|
batterPosition := TODO // interface{} | Position abbreviation. Format: SS, P, 1B, etc (optional)
|
||||||
|
pitcherPosition := TODO // interface{} | Position abbreviation. Format: SS, P, 1B, etc (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PredictionsAPI.GetProps(context.Background()).BatterId(batterId).PitcherId(pitcherId).VenueId(venueId).BatSide(batSide).PitchHand(pitchHand).BatterPosition(batterPosition).PitcherPosition(pitcherPosition).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PredictionsAPI.GetProps``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetPropsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**venueId** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
|
||||||
|
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
|
||||||
|
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
|
||||||
|
**batterPosition** | [**interface{}**](interface{}.md) | Position abbreviation. Format: SS, P, 1B, etc |
|
||||||
|
**pitcherPosition** | [**interface{}**](interface{}.md) | Position abbreviation. Format: SS, P, 1B, etc |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetPropsAdjust
|
||||||
|
|
||||||
|
> GetPropsAdjust(ctx).GamePk(gamePk).Execute()
|
||||||
|
|
||||||
|
Get play-level predictions based on input scenarios
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.PredictionsAPI.GetPropsAdjust(context.Background()).GamePk(gamePk).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `PredictionsAPI.GetPropsAdjust``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetPropsAdjustRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
# \ReviewsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GetReviewInfo**](ReviewsAPI.md#GetReviewInfo) | **Get** /api/v1/review | Get review info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GetReviewInfo
|
||||||
|
|
||||||
|
> GetReviewInfo(ctx).SportId(sportId).Season(season).GameType(gameType).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get review info
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc
|
||||||
|
season := TODO // interface{} | Comma delimited list of Seasons of play
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ReviewsAPI.GetReviewInfo(context.Background()).SportId(sportId).Season(season).GameType(gameType).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ReviewsAPI.GetReviewInfo``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetReviewInfoRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,645 @@
|
||||||
|
# \ScheduleAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**PostseasonSchedule**](ScheduleAPI.md#PostseasonSchedule) | **Get** /api/v1/schedule/postseason | Get postseason schedule
|
||||||
|
[**PostseasonScheduleSeries**](ScheduleAPI.md#PostseasonScheduleSeries) | **Get** /api/v1/schedule/postseason/series | Get postseason series schedules
|
||||||
|
[**Schedule**](ScheduleAPI.md#Schedule) | **Get** /api/v1/schedule | View schedule info based on scheduleType.
|
||||||
|
[**Schedule1**](ScheduleAPI.md#Schedule1) | **Get** /api/v1/schedule/{scheduleType} | View schedule info based on scheduleType.
|
||||||
|
[**TieGames**](ScheduleAPI.md#TieGames) | **Get** /api/v1/schedule/games/tied | Get tied game schedules
|
||||||
|
[**TrackingEventsSchedule**](ScheduleAPI.md#TrackingEventsSchedule) | **Get** /api/v1/schedule/trackingEvents | Get tracking event schedules
|
||||||
|
[**TuneIn**](ScheduleAPI.md#TuneIn) | **Get** /api/v1/schedule/postseason/tuneIn | Get postseason TuneIn schedules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## PostseasonSchedule
|
||||||
|
|
||||||
|
> PostseasonSchedule(ctx).GameTypes(gameTypes).SeriesNumber(seriesNumber).TeamId(teamId).SportId(sportId).UseLatestGames(useLatestGames).UseFeaturedGame(useFeaturedGame).Season(season).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get postseason schedule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
seriesNumber := TODO // interface{} | (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
sportId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
useLatestGames := TODO // interface{} | (optional)
|
||||||
|
useFeaturedGame := TODO // interface{} | (optional)
|
||||||
|
season := TODO // interface{} | (optional)
|
||||||
|
publicFacing := TODO // interface{} | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.PostseasonSchedule(context.Background()).GameTypes(gameTypes).SeriesNumber(seriesNumber).TeamId(teamId).SportId(sportId).UseLatestGames(useLatestGames).UseFeaturedGame(useFeaturedGame).Season(season).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.PostseasonSchedule``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPostseasonScheduleRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**seriesNumber** | [**interface{}**](interface{}.md) | |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**useLatestGames** | [**interface{}**](interface{}.md) | |
|
||||||
|
**useFeaturedGame** | [**interface{}**](interface{}.md) | |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | |
|
||||||
|
**publicFacing** | [**interface{}**](interface{}.md) | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## PostseasonScheduleSeries
|
||||||
|
|
||||||
|
> PostseasonScheduleSeries(ctx).GameTypes(gameTypes).SeriesNumber(seriesNumber).TeamId(teamId).SportId(sportId).Date(date).StartDate(startDate).EndDate(endDate).UseLatestGames(useLatestGames).UseFeaturedGame(useFeaturedGame).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get postseason series schedules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
seriesNumber := TODO // interface{} | (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
sportId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
useLatestGames := TODO // interface{} | (optional)
|
||||||
|
useFeaturedGame := TODO // interface{} | (optional)
|
||||||
|
season := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.PostseasonScheduleSeries(context.Background()).GameTypes(gameTypes).SeriesNumber(seriesNumber).TeamId(teamId).SportId(sportId).Date(date).StartDate(startDate).EndDate(endDate).UseLatestGames(useLatestGames).UseFeaturedGame(useFeaturedGame).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.PostseasonScheduleSeries``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiPostseasonScheduleSeriesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**seriesNumber** | [**interface{}**](interface{}.md) | |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**useLatestGames** | [**interface{}**](interface{}.md) | |
|
||||||
|
**useFeaturedGame** | [**interface{}**](interface{}.md) | |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Schedule
|
||||||
|
|
||||||
|
> Schedule(ctx).UsingPrivateEndpoint(usingPrivateEndpoint).CalendarTypes(calendarTypes).EventTypes(eventTypes).ScheduleEventTypes(scheduleEventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View schedule info based on scheduleType.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
usingPrivateEndpoint := TODO // interface{} |
|
||||||
|
calendarTypes := TODO // interface{} | Comma delimited list of type of calendar types (optional)
|
||||||
|
eventTypes := TODO // interface{} | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> (optional)
|
||||||
|
scheduleEventTypes := TODO // interface{} | Comma delimited list of type of event types (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
eventIds := TODO // interface{} | A unique identifier for non-game event (optional)
|
||||||
|
venueIds := TODO // interface{} | Unique Venue Identifier (optional)
|
||||||
|
performerIds := TODO // interface{} | A unique identifier for non-team event performers (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
useLatestGames := TODO // interface{} | (optional)
|
||||||
|
opponentId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
publicFacing := TODO // interface{} | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.Schedule(context.Background()).UsingPrivateEndpoint(usingPrivateEndpoint).CalendarTypes(calendarTypes).EventTypes(eventTypes).ScheduleEventTypes(scheduleEventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.Schedule``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiScheduleRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**usingPrivateEndpoint** | [**interface{}**](interface{}.md) | |
|
||||||
|
**calendarTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of calendar types |
|
||||||
|
**eventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> |
|
||||||
|
**scheduleEventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of event types |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**eventIds** | [**interface{}**](interface{}.md) | A unique identifier for non-game event |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
|
||||||
|
**performerIds** | [**interface{}**](interface{}.md) | A unique identifier for non-team event performers |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**useLatestGames** | [**interface{}**](interface{}.md) | |
|
||||||
|
**opponentId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**publicFacing** | [**interface{}**](interface{}.md) | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Schedule1
|
||||||
|
|
||||||
|
> Schedule1(ctx).UsingPrivateEndpoint(usingPrivateEndpoint).CalendarTypes(calendarTypes).EventTypes(eventTypes).ScheduleEventTypes(scheduleEventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View schedule info based on scheduleType.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
usingPrivateEndpoint := TODO // interface{} |
|
||||||
|
calendarTypes := TODO // interface{} | Comma delimited list of type of calendar types (optional)
|
||||||
|
eventTypes := TODO // interface{} | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> (optional)
|
||||||
|
scheduleEventTypes := TODO // interface{} | Comma delimited list of type of event types (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
eventIds := TODO // interface{} | A unique identifier for non-game event (optional)
|
||||||
|
venueIds := TODO // interface{} | Unique Venue Identifier (optional)
|
||||||
|
performerIds := TODO // interface{} | A unique identifier for non-team event performers (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
useLatestGames := TODO // interface{} | (optional)
|
||||||
|
opponentId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
publicFacing := TODO // interface{} | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.Schedule1(context.Background()).UsingPrivateEndpoint(usingPrivateEndpoint).CalendarTypes(calendarTypes).EventTypes(eventTypes).ScheduleEventTypes(scheduleEventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.Schedule1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSchedule1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**usingPrivateEndpoint** | [**interface{}**](interface{}.md) | |
|
||||||
|
**calendarTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of calendar types |
|
||||||
|
**eventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> |
|
||||||
|
**scheduleEventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of event types |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**eventIds** | [**interface{}**](interface{}.md) | A unique identifier for non-game event |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
|
||||||
|
**performerIds** | [**interface{}**](interface{}.md) | A unique identifier for non-team event performers |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**useLatestGames** | [**interface{}**](interface{}.md) | |
|
||||||
|
**opponentId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**publicFacing** | [**interface{}**](interface{}.md) | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TieGames
|
||||||
|
|
||||||
|
> TieGames(ctx).Season(season).SportId(sportId).GameTypes(gameTypes).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get tied game schedules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
season := TODO // interface{} | Season of play
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.TieGames(context.Background()).Season(season).SportId(sportId).GameTypes(gameTypes).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.TieGames``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiTieGamesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TrackingEventsSchedule
|
||||||
|
|
||||||
|
> TrackingEventsSchedule(ctx).CalendarTypes(calendarTypes).EventTypes(eventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get tracking event schedules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
calendarTypes := TODO // interface{} | Comma delimited list of type of calendar types (optional)
|
||||||
|
eventTypes := TODO // interface{} | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
eventIds := TODO // interface{} | A unique identifier for non-game event (optional)
|
||||||
|
venueIds := TODO // interface{} | Unique Venue Identifier (optional)
|
||||||
|
performerIds := TODO // interface{} | A unique identifier for non-team event performers (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
timecode := TODO // interface{} | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS (optional)
|
||||||
|
useLatestGames := TODO // interface{} | (optional)
|
||||||
|
opponentId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
publicFacing := TODO // interface{} | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.TrackingEventsSchedule(context.Background()).CalendarTypes(calendarTypes).EventTypes(eventTypes).TeamId(teamId).LeagueId(leagueId).SportId(sportId).GamePk(gamePk).GamePks(gamePks).EventIds(eventIds).VenueIds(venueIds).PerformerIds(performerIds).GameTypes(gameTypes).GameType(gameType).Season(season).Seasons(seasons).Date(date).StartDate(startDate).EndDate(endDate).Timecode(timecode).UseLatestGames(useLatestGames).OpponentId(opponentId).PublicFacing(publicFacing).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.TrackingEventsSchedule``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiTrackingEventsScheduleRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**calendarTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of calendar types |
|
||||||
|
**eventTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of events. <b>Note: Don't Use. This will be deprecated in favor of calendarTypes</b> |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**eventIds** | [**interface{}**](interface{}.md) | A unique identifier for non-game event |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
|
||||||
|
**performerIds** | [**interface{}**](interface{}.md) | A unique identifier for non-team event performers |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS |
|
||||||
|
**useLatestGames** | [**interface{}**](interface{}.md) | |
|
||||||
|
**opponentId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**publicFacing** | [**interface{}**](interface{}.md) | Return public, non-public or all games. Format: Public Facing = 'Y', Non-Public Facing = 'N', All = 'A' |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## TuneIn
|
||||||
|
|
||||||
|
> TuneIn(ctx).TeamId(teamId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get postseason TuneIn schedules
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
sportId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
season := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.ScheduleAPI.TuneIn(context.Background()).TeamId(teamId).SportId(sportId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduleAPI.TuneIn``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiTuneInRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,235 @@
|
||||||
|
# \SeasonAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AllSeasons**](SeasonAPI.md#AllSeasons) | **Get** /api/v1/seasons/all | View all seasons
|
||||||
|
[**Seasons**](SeasonAPI.md#Seasons) | **Get** /api/v1/seasons | View season info
|
||||||
|
[**Seasons1**](SeasonAPI.md#Seasons1) | **Get** /api/v1/seasons/{seasonId} | View season info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AllSeasons
|
||||||
|
|
||||||
|
> AllSeasons(ctx).DivisionId(divisionId).LeagueId(leagueId).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View all seasons
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
divisionId := TODO // interface{} | Unique Division Identifier (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
withGameTypeDates := TODO // interface{} | Retrieve dates for each game type (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SeasonAPI.AllSeasons(context.Background()).DivisionId(divisionId).LeagueId(leagueId).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SeasonAPI.AllSeasons``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllSeasonsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**divisionId** | [**interface{}**](interface{}.md) | Unique Division Identifier |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**withGameTypeDates** | [**interface{}**](interface{}.md) | Retrieve dates for each game type |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Seasons
|
||||||
|
|
||||||
|
> Seasons(ctx, seasonId).Season(season).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View season info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
seasonId := TODO // interface{} | Season of play
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
withGameTypeDates := TODO // interface{} | Retrieve dates for each game type (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SeasonAPI.Seasons(context.Background(), seasonId).Season(season).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SeasonAPI.Seasons``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**seasonId** | [**interface{}**](.md) | Season of play |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSeasonsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**withGameTypeDates** | [**interface{}**](interface{}.md) | Retrieve dates for each game type |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Seasons1
|
||||||
|
|
||||||
|
> Seasons1(ctx, seasonId).Season(season).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View season info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
seasonId := TODO // interface{} | Season of play
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
withGameTypeDates := TODO // interface{} | Retrieve dates for each game type (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SeasonAPI.Seasons1(context.Background(), seasonId).Season(season).SportId(sportId).WithGameTypeDates(withGameTypeDates).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SeasonAPI.Seasons1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**seasonId** | [**interface{}**](.md) | Season of play |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSeasons1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**withGameTypeDates** | [**interface{}**](interface{}.md) | Retrieve dates for each game type |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,158 @@
|
||||||
|
# \SkeletalAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**SkeletalChunked**](SkeletalAPI.md#SkeletalChunked) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/skeletalData/chunked | View Skeletal Data by playId and gameId chunked
|
||||||
|
[**SkeletalDataFileNames**](SkeletalAPI.md#SkeletalDataFileNames) | **Get** /api/v1/game/{gamePk}/{playId}/analytics/skeletalData/files | View Skeletal Data by playId and gameId files
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## SkeletalChunked
|
||||||
|
|
||||||
|
> SkeletalChunked(ctx, gamePk, playId).FileName(fileName).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Skeletal Data by playId and gameId chunked
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
playId := TODO // interface{} | Unique play identifier
|
||||||
|
fileName := TODO // interface{} | Skeletal chunked file name
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SkeletalAPI.SkeletalChunked(context.Background(), gamePk, playId).FileName(fileName).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SkeletalAPI.SkeletalChunked``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**playId** | [**interface{}**](.md) | Unique play identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSkeletalChunkedRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fileName** | [**interface{}**](interface{}.md) | Skeletal chunked file name |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## SkeletalDataFileNames
|
||||||
|
|
||||||
|
> SkeletalDataFileNames(ctx, gamePk, playId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Skeletal Data by playId and gameId files
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
playId := TODO // interface{} | Unique play identifier
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SkeletalAPI.SkeletalDataFileNames(context.Background(), gamePk, playId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SkeletalAPI.SkeletalDataFileNames``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**playId** | [**interface{}**](.md) | Unique play identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSkeletalDataFileNamesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,314 @@
|
||||||
|
# \SportsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**AllSportBallot**](SportsAPI.md#AllSportBallot) | **Get** /api/v1/sports/{sportId}/allSportBallot | Get ALL MLB ballot for sport
|
||||||
|
[**SportPlayers**](SportsAPI.md#SportPlayers) | **Get** /api/v1/sports/{sportId}/players | Get all players for a sport level
|
||||||
|
[**Sports**](SportsAPI.md#Sports) | **Get** /api/v1/sports | Get sports information
|
||||||
|
[**Sports1**](SportsAPI.md#Sports1) | **Get** /api/v1/sports/{sportId} | Get sports information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## AllSportBallot
|
||||||
|
|
||||||
|
> AllSportBallot(ctx, sportId).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get ALL MLB ballot for sport
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport
|
||||||
|
season := TODO // interface{} | season
|
||||||
|
fields := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SportsAPI.AllSportBallot(context.Background(), sportId).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.AllSportBallot``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiAllSportBallotRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | season |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## SportPlayers
|
||||||
|
|
||||||
|
> SportPlayers(ctx, sportId).Season(season).GameType(gameType).HasStats(hasStats).Accent(accent).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get all players for a sport level
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
|
||||||
|
accent := TODO // interface{} | Boolean value to specify wanting a person's name with accents or without (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SportsAPI.SportPlayers(context.Background(), sportId).Season(season).GameType(gameType).HasStats(hasStats).Accent(accent).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.SportPlayers``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSportPlayersRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
|
||||||
|
**accent** | [**interface{}**](interface{}.md) | Boolean value to specify wanting a person's name with accents or without |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Sports
|
||||||
|
|
||||||
|
> Sports(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
Get sports information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SportsAPI.Sports(context.Background(), sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.Sports``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSportsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Sports1
|
||||||
|
|
||||||
|
> Sports1(ctx, sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
Get sports information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
hasStats := TODO // interface{} | Returns sports that have individual player stats (optional)
|
||||||
|
activeStatus := TODO // interface{} | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.SportsAPI.Sports1(context.Background(), sportId).Season(season).Fields(fields).HasStats(hasStats).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `SportsAPI.Sports1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**sportId** | [**interface{}**](.md) | Top level organization of a sport |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiSports1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**hasStats** | [**interface{}**](interface{}.md) | Returns sports that have individual player stats |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Flag for fetching sports that are currently active (Y), inactive (N), pending (P), or all teams (B) |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
# \StandingsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Standings**](StandingsAPI.md#Standings) | **Get** /api/v1/standings/{standingsType} | View standings for a league
|
||||||
|
[**Standings1**](StandingsAPI.md#Standings1) | **Get** /api/v1/standings | View standings for a league
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Standings
|
||||||
|
|
||||||
|
> Standings(ctx, standingsType).LeagueId(leagueId).Season(season).StandingsTypes(standingsTypes).Date(date).TeamId(teamId).IncludeMLB(includeMLB).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View standings for a league
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
standingsType := TODO // interface{} | Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
standingsTypes := TODO // interface{} | Type of season. Available types in /api/v1/standingsTypes (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
includeMLB := TODO // interface{} | Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StandingsAPI.Standings(context.Background(), standingsType).LeagueId(leagueId).Season(season).StandingsTypes(standingsTypes).Date(date).TeamId(teamId).IncludeMLB(includeMLB).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StandingsAPI.Standings``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**standingsType** | [**interface{}**](.md) | Type of season. Available types in /api/v1/standingsTypes |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStandingsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**standingsTypes** | [**interface{}**](interface{}.md) | Type of season. Available types in /api/v1/standingsTypes |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**includeMLB** | [**interface{}**](interface{}.md) | Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Standings1
|
||||||
|
|
||||||
|
> Standings1(ctx, standingsType).LeagueId(leagueId).Season(season).StandingsTypes(standingsTypes).Date(date).TeamId(teamId).IncludeMLB(includeMLB).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View standings for a league
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
standingsType := TODO // interface{} | Type of season. Available types in /api/v1/standingsTypes
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
standingsTypes := TODO // interface{} | Type of season. Available types in /api/v1/standingsTypes (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
includeMLB := TODO // interface{} | Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StandingsAPI.Standings1(context.Background(), standingsType).LeagueId(leagueId).Season(season).StandingsTypes(standingsTypes).Date(date).TeamId(teamId).IncludeMLB(includeMLB).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StandingsAPI.Standings1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**standingsType** | [**interface{}**](.md) | Type of season. Available types in /api/v1/standingsTypes |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStandings1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**standingsTypes** | [**interface{}**](interface{}.md) | Type of season. Available types in /api/v1/standingsTypes |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**includeMLB** | [**interface{}**](interface{}.md) | Determines whether to include major league teams when using the 'BY_ORGANIZATION' standings type |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,974 @@
|
||||||
|
# \StatsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**BeastStats**](StatsAPI.md#BeastStats) | **Get** /api/v1/stats/search | View stats from search
|
||||||
|
[**GetOutsAboveAverage**](StatsAPI.md#GetOutsAboveAverage) | **Get** /api/v1/stats/analytics/outsAboveAverage | Get outs above average for the current batter
|
||||||
|
[**GetSprayChart**](StatsAPI.md#GetSprayChart) | **Get** /api/v1/stats/analytics/sprayChart | Get the spray chart info for the current batter
|
||||||
|
[**GetStolenBaseProbability**](StatsAPI.md#GetStolenBaseProbability) | **Get** /api/v1/stats/analytics/stolenBaseProbability | Get the probability of a hit for the given hit data
|
||||||
|
[**GroupedStats**](StatsAPI.md#GroupedStats) | **Get** /api/v1/stats/grouped | View grouped stats
|
||||||
|
[**Leaders2**](StatsAPI.md#Leaders2) | **Get** /api/v1/stats/leaders | Get leaders for a statistic
|
||||||
|
[**MetricStats**](StatsAPI.md#MetricStats) | **Get** /api/v1/stats/metrics | View metric stats
|
||||||
|
[**Stats2**](StatsAPI.md#Stats2) | **Get** /api/v1/stats | View stats
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## BeastStats
|
||||||
|
|
||||||
|
> BeastStats(ctx).Group(group).GamePks(gamePks).PlayIds(playIds).Seasons(seasons).GameTypes(gameTypes).Date(date).StartDate(startDate).EndDate(endDate).TeamIds(teamIds).PitcherTeamIds(pitcherTeamIds).BatterTeamIds(batterTeamIds).SportIds(sportIds).PitcherSportIds(pitcherSportIds).BatterSportIds(batterSportIds).LeagueIds(leagueIds).PitcherLeagueIds(pitcherLeagueIds).BatterLeagueIds(batterLeagueIds).DivisionIds(divisionIds).PitcherDivisionIds(pitcherDivisionIds).BatterDivisionIds(batterDivisionIds).PitchersOnTeamIds(pitchersOnTeamIds).BattersOnTeamIds(battersOnTeamIds).PlayerIds(playerIds).PlayerPool(playerPool).PitcherIds(pitcherIds).BatterIds(batterIds).CatcherIds(catcherIds).FirstBasemanIds(firstBasemanIds).SecondBasemanIds(secondBasemanIds).ThirdBasemanIds(thirdBasemanIds).ShortstopIds(shortstopIds).LeftFielderIds(leftFielderIds).CenterFielderIds(centerFielderIds).RightFielderIds(rightFielderIds).RunnerFirstIds(runnerFirstIds).RunnerSecondIds(runnerSecondIds).RunnerThirdIds(runnerThirdIds).VenueIds(venueIds).PitchHand(pitchHand).BatSide(batSide).PitchTypes(pitchTypes).PitchCodes(pitchCodes).EventTypes(eventTypes).Positions(positions).PrimaryPositions(primaryPositions).MinPitchSpeed(minPitchSpeed).MaxPitchSpeed(maxPitchSpeed).MinSpinRate(minSpinRate).MaxSpinRate(maxSpinRate).MinExtension(minExtension).MaxExtension(maxExtension).MinExitVelocityAgainst(minExitVelocityAgainst).MaxExitVelocityAgainst(maxExitVelocityAgainst).MinLaunchAngleAgainst(minLaunchAngleAgainst).MaxLaunchAngleAgainst(maxLaunchAngleAgainst).MinExitVelocity(minExitVelocity).MaxExitVelocity(maxExitVelocity).MinLaunchAngle(minLaunchAngle).MaxLaunchAngle(maxLaunchAngle).MinHomeRunDistance(minHomeRunDistance).MaxHomeRunDistance(maxHomeRunDistance).MinHitDistance(minHitDistance).MaxHitDistance(maxHitDistance).MinHangTime(minHangTime).MaxHangTime(maxHangTime).MinHitProbability(minHitProbability).MaxHitProbability(maxHitProbability).MinCatchProbability(minCatchProbability).MaxCatchProbability(maxCatchProbability).MinAttackAngle(minAttackAngle).MaxAttackAngle(maxAttackAngle).MinBatSpeed(minBatSpeed).MaxBatSpeed(maxBatSpeed).MinHomeRunXBallparks(minHomeRunXBallparks).MaxHomeRunXBallparks(maxHomeRunXBallparks).IsBarrel(isBarrel).HitTrajectories(hitTrajectories).Limit(limit).Offset(offset).GroupBy(groupBy).CompareOver(compareOver).SortStat(sortStat).SortModifier(sortModifier).SortOrder(sortOrder).Percentile(percentile).MinOccurrences(minOccurrences).MinPlateAppearances(minPlateAppearances).MinInnings(minInnings).QualifierRate(qualifierRate).SitCodes(sitCodes).ShowTotals(showTotals).IncludeNullMetrics(includeNullMetrics).StatFields(statFields).AtBatNumbers(atBatNumbers).PitchNumbers(pitchNumbers).Fields(fields).Debug(debug).ActiveStatus(activeStatus).Execute()
|
||||||
|
|
||||||
|
View stats from search
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys (optional)
|
||||||
|
playIds := TODO // interface{} | Comma delimited list of unique play identifiers (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
gameTypes := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
endDate := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
teamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
pitcherTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
batterTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
pitcherSportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
batterSportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
pitcherLeagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
batterLeagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
divisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
|
||||||
|
pitcherDivisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
|
||||||
|
batterDivisionIds := TODO // interface{} | Comma delimited list of Unique League Identifiers (optional)
|
||||||
|
pitchersOnTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
battersOnTeamIds := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
playerIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
|
||||||
|
pitcherIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
batterIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
catcherIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
firstBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
secondBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
thirdBasemanIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
shortstopIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
leftFielderIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
centerFielderIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
rightFielderIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
runnerFirstIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
runnerSecondIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
runnerThirdIds := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
venueIds := TODO // interface{} | Unique Venue Identifier (optional)
|
||||||
|
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
|
||||||
|
batSide := TODO // interface{} | Bat side of hitter (optional)
|
||||||
|
pitchTypes := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
|
||||||
|
pitchCodes := TODO // interface{} | Result of the pitch (ball, called strike, etc...) (optional)
|
||||||
|
eventTypes := TODO // interface{} | Type of event (optional)
|
||||||
|
positions := TODO // interface{} | All of the details of a player's position (optional)
|
||||||
|
primaryPositions := TODO // interface{} | All of the details of a player's position (optional)
|
||||||
|
minPitchSpeed := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxPitchSpeed := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minSpinRate := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxSpinRate := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minExtension := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxExtension := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minExitVelocityAgainst := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxExitVelocityAgainst := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minLaunchAngleAgainst := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxLaunchAngleAgainst := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minExitVelocity := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxExitVelocity := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minLaunchAngle := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxLaunchAngle := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minHomeRunDistance := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxHomeRunDistance := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minHitDistance := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxHitDistance := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minHangTime := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxHangTime := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minHitProbability := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxHitProbability := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minCatchProbability := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxCatchProbability := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minAttackAngle := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxAttackAngle := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minBatSpeed := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxBatSpeed := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
minHomeRunXBallparks := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxHomeRunXBallparks := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
isBarrel := TODO // interface{} | Whether or not a play resulted in a barreled ball (optional)
|
||||||
|
hitTrajectories := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
groupBy := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
|
||||||
|
compareOver := TODO // interface{} | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP (optional)
|
||||||
|
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
|
||||||
|
sortModifier := TODO // interface{} | The prefix modifier for the sort stat. avg, min, max. I.E minExitVelocity, maxLaunchAngle, avgHitDistance (optional)
|
||||||
|
sortOrder := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
percentile := TODO // interface{} | Only return averages above this percentile. used for best effort plays (optional)
|
||||||
|
minOccurrences := TODO // interface{} | Minimum occurrences to filter upon (optional)
|
||||||
|
minPlateAppearances := TODO // interface{} | Minimum occurrences to filter upon (optional)
|
||||||
|
minInnings := TODO // interface{} | Minimum occurrences to filter upon (optional)
|
||||||
|
qualifierRate := TODO // interface{} | Minimum occurrences to filter upon (optional)
|
||||||
|
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
|
||||||
|
showTotals := TODO // interface{} | Columns to return totals (optional)
|
||||||
|
includeNullMetrics := TODO // interface{} | Show events with null metrics (optional)
|
||||||
|
statFields := TODO // interface{} | Baseball stat fields to populate (optional)
|
||||||
|
atBatNumbers := TODO // interface{} | The at bat number of a given game. Format: 1, 2, 3, etc (optional)
|
||||||
|
pitchNumbers := TODO // interface{} | The pitch number of a given game. Format: 1, 2, 3, etc (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
debug := TODO // interface{} | (optional)
|
||||||
|
activeStatus := TODO // interface{} | Whether or not a player is active (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.BeastStats(context.Background()).Group(group).GamePks(gamePks).PlayIds(playIds).Seasons(seasons).GameTypes(gameTypes).Date(date).StartDate(startDate).EndDate(endDate).TeamIds(teamIds).PitcherTeamIds(pitcherTeamIds).BatterTeamIds(batterTeamIds).SportIds(sportIds).PitcherSportIds(pitcherSportIds).BatterSportIds(batterSportIds).LeagueIds(leagueIds).PitcherLeagueIds(pitcherLeagueIds).BatterLeagueIds(batterLeagueIds).DivisionIds(divisionIds).PitcherDivisionIds(pitcherDivisionIds).BatterDivisionIds(batterDivisionIds).PitchersOnTeamIds(pitchersOnTeamIds).BattersOnTeamIds(battersOnTeamIds).PlayerIds(playerIds).PlayerPool(playerPool).PitcherIds(pitcherIds).BatterIds(batterIds).CatcherIds(catcherIds).FirstBasemanIds(firstBasemanIds).SecondBasemanIds(secondBasemanIds).ThirdBasemanIds(thirdBasemanIds).ShortstopIds(shortstopIds).LeftFielderIds(leftFielderIds).CenterFielderIds(centerFielderIds).RightFielderIds(rightFielderIds).RunnerFirstIds(runnerFirstIds).RunnerSecondIds(runnerSecondIds).RunnerThirdIds(runnerThirdIds).VenueIds(venueIds).PitchHand(pitchHand).BatSide(batSide).PitchTypes(pitchTypes).PitchCodes(pitchCodes).EventTypes(eventTypes).Positions(positions).PrimaryPositions(primaryPositions).MinPitchSpeed(minPitchSpeed).MaxPitchSpeed(maxPitchSpeed).MinSpinRate(minSpinRate).MaxSpinRate(maxSpinRate).MinExtension(minExtension).MaxExtension(maxExtension).MinExitVelocityAgainst(minExitVelocityAgainst).MaxExitVelocityAgainst(maxExitVelocityAgainst).MinLaunchAngleAgainst(minLaunchAngleAgainst).MaxLaunchAngleAgainst(maxLaunchAngleAgainst).MinExitVelocity(minExitVelocity).MaxExitVelocity(maxExitVelocity).MinLaunchAngle(minLaunchAngle).MaxLaunchAngle(maxLaunchAngle).MinHomeRunDistance(minHomeRunDistance).MaxHomeRunDistance(maxHomeRunDistance).MinHitDistance(minHitDistance).MaxHitDistance(maxHitDistance).MinHangTime(minHangTime).MaxHangTime(maxHangTime).MinHitProbability(minHitProbability).MaxHitProbability(maxHitProbability).MinCatchProbability(minCatchProbability).MaxCatchProbability(maxCatchProbability).MinAttackAngle(minAttackAngle).MaxAttackAngle(maxAttackAngle).MinBatSpeed(minBatSpeed).MaxBatSpeed(maxBatSpeed).MinHomeRunXBallparks(minHomeRunXBallparks).MaxHomeRunXBallparks(maxHomeRunXBallparks).IsBarrel(isBarrel).HitTrajectories(hitTrajectories).Limit(limit).Offset(offset).GroupBy(groupBy).CompareOver(compareOver).SortStat(sortStat).SortModifier(sortModifier).SortOrder(sortOrder).Percentile(percentile).MinOccurrences(minOccurrences).MinPlateAppearances(minPlateAppearances).MinInnings(minInnings).QualifierRate(qualifierRate).SitCodes(sitCodes).ShowTotals(showTotals).IncludeNullMetrics(includeNullMetrics).StatFields(statFields).AtBatNumbers(atBatNumbers).PitchNumbers(pitchNumbers).Fields(fields).Debug(debug).ActiveStatus(activeStatus).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.BeastStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiBeastStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**playIds** | [**interface{}**](interface{}.md) | Comma delimited list of unique play identifiers |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**pitcherTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**batterTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**pitcherSportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**batterSportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**pitcherLeagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**batterLeagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**divisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
|
||||||
|
**pitcherDivisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
|
||||||
|
**batterDivisionIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique League Identifiers |
|
||||||
|
**pitchersOnTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**battersOnTeamIds** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**playerIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||||||
|
**pitcherIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**batterIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**catcherIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**firstBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**secondBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**thirdBasemanIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**shortstopIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**leftFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**centerFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**rightFielderIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**runnerFirstIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**runnerSecondIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**runnerThirdIds** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Unique Venue Identifier |
|
||||||
|
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
|
||||||
|
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
|
||||||
|
**pitchTypes** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
|
||||||
|
**pitchCodes** | [**interface{}**](interface{}.md) | Result of the pitch (ball, called strike, etc...) |
|
||||||
|
**eventTypes** | [**interface{}**](interface{}.md) | Type of event |
|
||||||
|
**positions** | [**interface{}**](interface{}.md) | All of the details of a player's position |
|
||||||
|
**primaryPositions** | [**interface{}**](interface{}.md) | All of the details of a player's position |
|
||||||
|
**minPitchSpeed** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxPitchSpeed** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minSpinRate** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxSpinRate** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minExtension** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxExtension** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minExitVelocityAgainst** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxExitVelocityAgainst** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minLaunchAngleAgainst** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxLaunchAngleAgainst** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minExitVelocity** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxExitVelocity** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minLaunchAngle** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxLaunchAngle** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minHomeRunDistance** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxHomeRunDistance** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minHitDistance** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxHitDistance** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minHangTime** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxHangTime** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minHitProbability** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxHitProbability** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minCatchProbability** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxCatchProbability** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minAttackAngle** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxAttackAngle** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minBatSpeed** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxBatSpeed** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**minHomeRunXBallparks** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxHomeRunXBallparks** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**isBarrel** | [**interface{}**](interface{}.md) | Whether or not a play resulted in a barreled ball |
|
||||||
|
**hitTrajectories** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**groupBy** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||||||
|
**compareOver** | [**interface{}**](interface{}.md) | Group stats by PLAYER, TEAM, SEASON, VENUE, SPORT or STAT_GROUP |
|
||||||
|
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
|
||||||
|
**sortModifier** | [**interface{}**](interface{}.md) | The prefix modifier for the sort stat. avg, min, max. I.E minExitVelocity, maxLaunchAngle, avgHitDistance |
|
||||||
|
**sortOrder** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**percentile** | [**interface{}**](interface{}.md) | Only return averages above this percentile. used for best effort plays |
|
||||||
|
**minOccurrences** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
|
||||||
|
**minPlateAppearances** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
|
||||||
|
**minInnings** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
|
||||||
|
**qualifierRate** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
|
||||||
|
**showTotals** | [**interface{}**](interface{}.md) | Columns to return totals |
|
||||||
|
**includeNullMetrics** | [**interface{}**](interface{}.md) | Show events with null metrics |
|
||||||
|
**statFields** | [**interface{}**](interface{}.md) | Baseball stat fields to populate |
|
||||||
|
**atBatNumbers** | [**interface{}**](interface{}.md) | The at bat number of a given game. Format: 1, 2, 3, etc |
|
||||||
|
**pitchNumbers** | [**interface{}**](interface{}.md) | The pitch number of a given game. Format: 1, 2, 3, etc |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**debug** | [**interface{}**](interface{}.md) | |
|
||||||
|
**activeStatus** | [**interface{}**](interface{}.md) | Whether or not a player is active |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetOutsAboveAverage
|
||||||
|
|
||||||
|
> GetOutsAboveAverage(ctx).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get outs above average for the current batter
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} |
|
||||||
|
timecode := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.GetOutsAboveAverage(context.Background()).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetOutsAboveAverage``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetOutsAboveAverageRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetSprayChart
|
||||||
|
|
||||||
|
> GetSprayChart(ctx).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the spray chart info for the current batter
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} |
|
||||||
|
timecode := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.GetSprayChart(context.Background()).GamePk(gamePk).Timecode(timecode).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetSprayChart``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetSprayChartRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GetStolenBaseProbability
|
||||||
|
|
||||||
|
> GetStolenBaseProbability(ctx).GamePk(gamePk).Timecode(timecode).Execute()
|
||||||
|
|
||||||
|
Get the probability of a hit for the given hit data
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} |
|
||||||
|
timecode := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.GetStolenBaseProbability(context.Background()).GamePk(gamePk).Timecode(timecode).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GetStolenBaseProbability``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetStolenBaseProbabilityRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | |
|
||||||
|
**timecode** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## GroupedStats
|
||||||
|
|
||||||
|
> GroupedStats(ctx).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).StatFields(statFields).SortField(sortField).Execute()
|
||||||
|
|
||||||
|
View grouped stats
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
|
||||||
|
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
|
||||||
|
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
|
||||||
|
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
|
||||||
|
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
|
||||||
|
excludeTradedPlayers := TODO // interface{} | Excludes players who have since been traded from the input team (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
statFields := TODO // interface{} | Baseball stat fields to populate (optional)
|
||||||
|
sortField := TODO // interface{} | Baseball statField to sort on. If no statField is given, sortField defaults to BASIC. If 1 statField is given, that is the default sortField. (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.GroupedStats(context.Background()).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).StatFields(statFields).SortField(sortField).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.GroupedStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGroupedStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
|
||||||
|
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
|
||||||
|
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
|
||||||
|
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
|
||||||
|
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
|
||||||
|
**excludeTradedPlayers** | [**interface{}**](interface{}.md) | Excludes players who have since been traded from the input team |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**statFields** | [**interface{}**](interface{}.md) | Baseball stat fields to populate |
|
||||||
|
**sortField** | [**interface{}**](interface{}.md) | Baseball statField to sort on. If no statField is given, sortField defaults to BASIC. If 1 statField is given, that is the default sortField. |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Leaders2
|
||||||
|
|
||||||
|
> Leaders2(ctx).LeaderCategories(leaderCategories).LeaderGameTypes(leaderGameTypes).StatGroup(statGroup).Season(season).Expand(expand).SportId(sportId).SportIds(sportIds).Stats(stats).Limit(limit).Offset(offset).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).PlayerPool(playerPool).StatType(statType).PlayerActive(playerActive).Position(position).SitCodes(sitCodes).OpposingTeamId(opposingTeamId).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).GroupBy(groupBy).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get leaders for a statistic
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leaderCategories := TODO // interface{} | (optional)
|
||||||
|
leaderGameTypes := TODO // interface{} | (optional)
|
||||||
|
statGroup := TODO // interface{} | (optional)
|
||||||
|
season := TODO // interface{} | (optional)
|
||||||
|
expand := TODO // interface{} | (optional)
|
||||||
|
sportId := TODO // interface{} | (optional)
|
||||||
|
sportIds := TODO // interface{} | (optional)
|
||||||
|
stats := TODO // interface{} | (optional)
|
||||||
|
limit := TODO // interface{} | (optional)
|
||||||
|
offset := TODO // interface{} | (optional)
|
||||||
|
teamId := TODO // interface{} | (optional)
|
||||||
|
teamIds := TODO // interface{} | (optional)
|
||||||
|
leagueId := TODO // interface{} | (optional)
|
||||||
|
leagueIds := TODO // interface{} | (optional)
|
||||||
|
leagueListId := TODO // interface{} | (optional)
|
||||||
|
playerPool := TODO // interface{} | (optional)
|
||||||
|
statType := TODO // interface{} | (optional)
|
||||||
|
playerActive := TODO // interface{} | (optional)
|
||||||
|
position := TODO // interface{} | (optional)
|
||||||
|
sitCodes := TODO // interface{} | (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | (optional)
|
||||||
|
startDate := TODO // interface{} | (optional)
|
||||||
|
endDate := TODO // interface{} | (optional)
|
||||||
|
daysBack := TODO // interface{} | (optional)
|
||||||
|
gamesBack := TODO // interface{} | (optional)
|
||||||
|
groupBy := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.Leaders2(context.Background()).LeaderCategories(leaderCategories).LeaderGameTypes(leaderGameTypes).StatGroup(statGroup).Season(season).Expand(expand).SportId(sportId).SportIds(sportIds).Stats(stats).Limit(limit).Offset(offset).TeamId(teamId).TeamIds(teamIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).PlayerPool(playerPool).StatType(statType).PlayerActive(playerActive).Position(position).SitCodes(sitCodes).OpposingTeamId(opposingTeamId).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).GroupBy(groupBy).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.Leaders2``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiLeaders2Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**leaderCategories** | [**interface{}**](interface{}.md) | |
|
||||||
|
**leaderGameTypes** | [**interface{}**](interface{}.md) | |
|
||||||
|
**statGroup** | [**interface{}**](interface{}.md) | |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | |
|
||||||
|
**expand** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | |
|
||||||
|
**playerPool** | [**interface{}**](interface{}.md) | |
|
||||||
|
**statType** | [**interface{}**](interface{}.md) | |
|
||||||
|
**playerActive** | [**interface{}**](interface{}.md) | |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | |
|
||||||
|
**daysBack** | [**interface{}**](interface{}.md) | |
|
||||||
|
**gamesBack** | [**interface{}**](interface{}.md) | |
|
||||||
|
**groupBy** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## MetricStats
|
||||||
|
|
||||||
|
> MetricStats(ctx).Stats(stats).Metrics(metrics).PersonId(personId).PersonIds(personIds).BatterId(batterId).PitcherId(pitcherId).TeamId(teamId).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Position(position).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).PitchHand(pitchHand).VenueId(venueId).GamePk(gamePk).MinValue(minValue).MaxValue(maxValue).Percentile(percentile).MinOccurrences(minOccurrences).Offset(offset).Limit(limit).Order(order).Date(date).StartDate(startDate).EndDate(endDate).GameType(gameType).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).Fields(fields).Debug(debug).Execute()
|
||||||
|
|
||||||
|
View metric stats
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
|
||||||
|
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
personIds := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
opposingPlayerId := TODO // interface{} | A unique identifier for the opposing team (optional)
|
||||||
|
position := TODO // interface{} | All of the details of a player's position (optional)
|
||||||
|
eventType := TODO // interface{} | Type of event (optional)
|
||||||
|
pitchType := TODO // interface{} | Classification of pitch (fastball, curveball, etc...) (optional)
|
||||||
|
hitTrajectory := TODO // interface{} | Trajectory of hit (line drive, fly ball, etc...) (optional)
|
||||||
|
batSide := TODO // interface{} | Bat side of hitter (optional)
|
||||||
|
pitchHand := TODO // interface{} | Handedness of pitcher (optional)
|
||||||
|
venueId := TODO // interface{} | All of the details of a venue (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
minValue := TODO // interface{} | Minimum value to filter on (optional)
|
||||||
|
maxValue := TODO // interface{} | Maximum value to filter on (optional)
|
||||||
|
percentile := TODO // interface{} | Only return averages above this percentile. used for best effort plays (optional)
|
||||||
|
minOccurrences := TODO // interface{} | Minimum occurrences to filter upon (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
|
||||||
|
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
debug := TODO // interface{} | (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.MetricStats(context.Background()).Stats(stats).Metrics(metrics).PersonId(personId).PersonIds(personIds).BatterId(batterId).PitcherId(pitcherId).TeamId(teamId).Group(group).Season(season).Seasons(seasons).SportId(sportId).OpposingTeamId(opposingTeamId).OpposingPlayerId(opposingPlayerId).Position(position).EventType(eventType).PitchType(pitchType).HitTrajectory(hitTrajectory).BatSide(batSide).PitchHand(pitchHand).VenueId(venueId).GamePk(gamePk).MinValue(minValue).MaxValue(maxValue).Percentile(percentile).MinOccurrences(minOccurrences).Offset(offset).Limit(limit).Order(order).Date(date).StartDate(startDate).EndDate(endDate).GameType(gameType).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).Fields(fields).Debug(debug).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.MetricStats``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiMetricStatsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||||||
|
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||||||
|
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**personIds** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**opposingPlayerId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | All of the details of a player's position |
|
||||||
|
**eventType** | [**interface{}**](interface{}.md) | Type of event |
|
||||||
|
**pitchType** | [**interface{}**](interface{}.md) | Classification of pitch (fastball, curveball, etc...) |
|
||||||
|
**hitTrajectory** | [**interface{}**](interface{}.md) | Trajectory of hit (line drive, fly ball, etc...) |
|
||||||
|
**batSide** | [**interface{}**](interface{}.md) | Bat side of hitter |
|
||||||
|
**pitchHand** | [**interface{}**](interface{}.md) | Handedness of pitcher |
|
||||||
|
**venueId** | [**interface{}**](interface{}.md) | All of the details of a venue |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**minValue** | [**interface{}**](interface{}.md) | Minimum value to filter on |
|
||||||
|
**maxValue** | [**interface{}**](interface{}.md) | Maximum value to filter on |
|
||||||
|
**percentile** | [**interface{}**](interface{}.md) | Only return averages above this percentile. used for best effort plays |
|
||||||
|
**minOccurrences** | [**interface{}**](interface{}.md) | Minimum occurrences to filter upon |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
|
||||||
|
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**debug** | [**interface{}**](interface{}.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Stats2
|
||||||
|
|
||||||
|
> Stats2(ctx).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).Execute()
|
||||||
|
|
||||||
|
View stats
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
stats := TODO // interface{} | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes
|
||||||
|
group := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups
|
||||||
|
personId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
teamIds := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
leagueListId := TODO // interface{} | Unique League List Identifier (optional)
|
||||||
|
metrics := TODO // interface{} | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics (optional)
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game (optional)
|
||||||
|
batterTeamId := TODO // interface{} | A unique identifier for the batter's team (optional)
|
||||||
|
pitcherTeamId := TODO // interface{} | A unique identifier for the pitcher's team (optional)
|
||||||
|
batterId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
pitcherId := TODO // interface{} | Unique Player Identifier. Format: 434538, 429665, etc (optional)
|
||||||
|
sitCodes := TODO // interface{} | Situation code for a given stat split. (optional)
|
||||||
|
combineSits := TODO // interface{} | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false (optional)
|
||||||
|
opposingTeamId := TODO // interface{} | A unique identifier for the opposing team. Must be used with Team ID (optional)
|
||||||
|
fields := TODO // interface{} | (optional)
|
||||||
|
sortStat := TODO // interface{} | Baseball stat to sort splits by. (optional)
|
||||||
|
order := TODO // interface{} | The order of sorting, ascending or descending (optional)
|
||||||
|
playerPool := TODO // interface{} | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. (optional)
|
||||||
|
position := TODO // interface{} | Position number. Format: 1, 2, 3, etc (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
daysBack := TODO // interface{} | Returns results from the last 'X' days (Starting from yesterday). (optional)
|
||||||
|
gamesBack := TODO // interface{} | Returns results from the last 'X' games played. (optional)
|
||||||
|
excludeTradedPlayers := TODO // interface{} | Excludes players who have since been traded from the input team (optional)
|
||||||
|
offset := TODO // interface{} | The pointer to start for a return set; used for pagination (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StatsAPI.Stats2(context.Background()).Stats(stats).Group(group).PersonId(personId).TeamId(teamId).TeamIds(teamIds).GameType(gameType).Season(season).Seasons(seasons).SportId(sportId).SportIds(sportIds).LeagueId(leagueId).LeagueIds(leagueIds).LeagueListId(leagueListId).Metrics(metrics).GamePk(gamePk).BatterTeamId(batterTeamId).PitcherTeamId(pitcherTeamId).BatterId(batterId).PitcherId(pitcherId).SitCodes(sitCodes).CombineSits(combineSits).OpposingTeamId(opposingTeamId).Fields(fields).SortStat(sortStat).Order(order).PlayerPool(playerPool).Position(position).StartDate(startDate).EndDate(endDate).DaysBack(daysBack).GamesBack(gamesBack).ExcludeTradedPlayers(excludeTradedPlayers).Offset(offset).Limit(limit).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StatsAPI.Stats2``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStats2Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**stats** | [**interface{}**](interface{}.md) | Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes |
|
||||||
|
**group** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**personId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**leagueListId** | [**interface{}**](interface{}.md) | Unique League List Identifier |
|
||||||
|
**metrics** | [**interface{}**](interface{}.md) | Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics |
|
||||||
|
**gamePk** | [**interface{}**](interface{}.md) | Unique Primary Key Representing a Game |
|
||||||
|
**batterTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the batter's team |
|
||||||
|
**pitcherTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the pitcher's team |
|
||||||
|
**batterId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**pitcherId** | [**interface{}**](interface{}.md) | Unique Player Identifier. Format: 434538, 429665, etc |
|
||||||
|
**sitCodes** | [**interface{}**](interface{}.md) | Situation code for a given stat split. |
|
||||||
|
**combineSits** | [**interface{}**](interface{}.md) | If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false |
|
||||||
|
**opposingTeamId** | [**interface{}**](interface{}.md) | A unique identifier for the opposing team. Must be used with Team ID |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sortStat** | [**interface{}**](interface{}.md) | Baseball stat to sort splits by. |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | The order of sorting, ascending or descending |
|
||||||
|
**playerPool** | [**interface{}**](interface{}.md) | Return \"ALL\" or only \"QUALIFIED\" players based on plate appearances. |
|
||||||
|
**position** | [**interface{}**](interface{}.md) | Position number. Format: 1, 2, 3, etc |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**daysBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' days (Starting from yesterday). |
|
||||||
|
**gamesBack** | [**interface{}**](interface{}.md) | Returns results from the last 'X' games played. |
|
||||||
|
**excludeTradedPlayers** | [**interface{}**](interface{}.md) | Excludes players who have since been traded from the input team |
|
||||||
|
**offset** | [**interface{}**](interface{}.md) | The pointer to start for a return set; used for pagination |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,161 @@
|
||||||
|
# \StreaksAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**GetStreaks**](StreaksAPI.md#GetStreaks) | **Get** /api/v1/streaks | View streaks
|
||||||
|
[**StreakTypes**](StreaksAPI.md#StreakTypes) | **Get** /api/v1/streaks/types | View streaks parameter options
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## GetStreaks
|
||||||
|
|
||||||
|
> GetStreaks(ctx).StreakOrg(streakOrg).StreakStat(streakStat).StreakSpan(streakSpan).StreakLevel(streakLevel).StreakThreshold(streakThreshold).Inverse(inverse).StartersOnly(startersOnly).StatGroup(statGroup).GameType(gameType).Season(season).TeamId(teamId).LeagueId(leagueId).SportId(sportId).ActiveStreak(activeStreak).Limit(limit).Fields(fields).PlayerId(playerId).Execute()
|
||||||
|
|
||||||
|
View streaks
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
streakOrg := TODO // interface{} | (optional)
|
||||||
|
streakStat := TODO // interface{} | (optional)
|
||||||
|
streakSpan := TODO // interface{} | (optional)
|
||||||
|
streakLevel := TODO // interface{} | (optional)
|
||||||
|
streakThreshold := TODO // interface{} | (optional)
|
||||||
|
inverse := TODO // interface{} | (optional)
|
||||||
|
startersOnly := TODO // interface{} | (optional)
|
||||||
|
statGroup := TODO // interface{} | Category of statistic to return. Available types in /api/v1/statGroups (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
teamId := TODO // interface{} | Unique Team Identifier. Format: 141, 147, etc (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
activeStreak := TODO // interface{} | Whether or not a player is active (optional)
|
||||||
|
limit := TODO // interface{} | Number of results to return (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StreaksAPI.GetStreaks(context.Background()).StreakOrg(streakOrg).StreakStat(streakStat).StreakSpan(streakSpan).StreakLevel(streakLevel).StreakThreshold(streakThreshold).Inverse(inverse).StartersOnly(startersOnly).StatGroup(statGroup).GameType(gameType).Season(season).TeamId(teamId).LeagueId(leagueId).SportId(sportId).ActiveStreak(activeStreak).Limit(limit).Fields(fields).PlayerId(playerId).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StreaksAPI.GetStreaks``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiGetStreaksRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**streakOrg** | [**interface{}**](interface{}.md) | |
|
||||||
|
**streakStat** | [**interface{}**](interface{}.md) | |
|
||||||
|
**streakSpan** | [**interface{}**](interface{}.md) | |
|
||||||
|
**streakLevel** | [**interface{}**](interface{}.md) | |
|
||||||
|
**streakThreshold** | [**interface{}**](interface{}.md) | |
|
||||||
|
**inverse** | [**interface{}**](interface{}.md) | |
|
||||||
|
**startersOnly** | [**interface{}**](interface{}.md) | |
|
||||||
|
**statGroup** | [**interface{}**](interface{}.md) | Category of statistic to return. Available types in /api/v1/statGroups |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Unique Team Identifier. Format: 141, 147, etc |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**activeStreak** | [**interface{}**](interface{}.md) | Whether or not a player is active |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | Number of results to return |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## StreakTypes
|
||||||
|
|
||||||
|
> StreakTypes(ctx).Execute()
|
||||||
|
|
||||||
|
View streaks parameter options
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.StreaksAPI.StreakTypes(context.Background()).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `StreaksAPI.StreakTypes``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiStreakTypesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,97 @@
|
||||||
|
# \TransactionsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Transactions**](TransactionsAPI.md#Transactions) | **Get** /api/v1/transactions | View transaction info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Transactions
|
||||||
|
|
||||||
|
> Transactions(ctx).LeagueId(leagueId).SportId(sportId).TeamId(teamId).PlayerId(playerId).Date(date).StartDate(startDate).EndDate(endDate).TransactionIds(transactionIds).TransactionTypes(transactionTypes).DivisionIds(divisionIds).Order(order).Limit(limit).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View transaction info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
leagueId := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
sportId := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
teamId := TODO // interface{} | Comma delimited list of Unique Team identifiers (optional)
|
||||||
|
playerId := TODO // interface{} | A unique identifier for a player (optional)
|
||||||
|
date := TODO // interface{} | Date of Game. Format: YYYY-MM-DD (optional)
|
||||||
|
startDate := TODO // interface{} | Start date for range of data (must be used with end date). Format: MM/DD/YYYY (optional)
|
||||||
|
endDate := TODO // interface{} | End date for range of data (must be used with start date). Format: MM/DD/YYYY (optional)
|
||||||
|
transactionIds := TODO // interface{} | (optional)
|
||||||
|
transactionTypes := TODO // interface{} | (optional)
|
||||||
|
divisionIds := TODO // interface{} | (optional)
|
||||||
|
order := TODO // interface{} | (optional)
|
||||||
|
limit := TODO // interface{} | (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.TransactionsAPI.Transactions(context.Background()).LeagueId(leagueId).SportId(sportId).TeamId(teamId).PlayerId(playerId).Date(date).StartDate(startDate).EndDate(endDate).TransactionIds(transactionIds).TransactionTypes(transactionTypes).DivisionIds(divisionIds).Order(order).Limit(limit).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.Transactions``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiTransactionsRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
**teamId** | [**interface{}**](interface{}.md) | Comma delimited list of Unique Team identifiers |
|
||||||
|
**playerId** | [**interface{}**](interface{}.md) | A unique identifier for a player |
|
||||||
|
**date** | [**interface{}**](interface{}.md) | Date of Game. Format: YYYY-MM-DD |
|
||||||
|
**startDate** | [**interface{}**](interface{}.md) | Start date for range of data (must be used with end date). Format: MM/DD/YYYY |
|
||||||
|
**endDate** | [**interface{}**](interface{}.md) | End date for range of data (must be used with start date). Format: MM/DD/YYYY |
|
||||||
|
**transactionIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**transactionTypes** | [**interface{}**](interface{}.md) | |
|
||||||
|
**divisionIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**order** | [**interface{}**](interface{}.md) | |
|
||||||
|
**limit** | [**interface{}**](interface{}.md) | |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
# \UniformsAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**UniformsByGame**](UniformsAPI.md#UniformsByGame) | **Get** /api/v1/uniforms/game | View Game Uniform info
|
||||||
|
[**UniformsByTeam**](UniformsAPI.md#UniformsByTeam) | **Get** /api/v1/uniforms/team | View Team Uniform info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## UniformsByGame
|
||||||
|
|
||||||
|
> UniformsByGame(ctx).GamePks(gamePks).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Game Uniform info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePks := TODO // interface{} | Comma delimited list of unique primary keys
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.UniformsAPI.UniformsByGame(context.Background()).GamePks(gamePks).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `UniformsAPI.UniformsByGame``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiUniformsByGameRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**gamePks** | [**interface{}**](interface{}.md) | Comma delimited list of unique primary keys |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## UniformsByTeam
|
||||||
|
|
||||||
|
> UniformsByTeam(ctx).TeamIds(teamIds).Season(season).Fields(fields).Execute()
|
||||||
|
|
||||||
|
View Team Uniform info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
teamIds := TODO // interface{} |
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.UniformsAPI.UniformsByTeam(context.Background()).TeamIds(teamIds).Season(season).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `UniformsAPI.UniformsByTeam``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiUniformsByTeamRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**teamIds** | [**interface{}**](interface{}.md) | |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,194 @@
|
||||||
|
# \VenuesAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**Venues**](VenuesAPI.md#Venues) | **Get** /api/v1/venues | View venue info
|
||||||
|
[**Venues1**](VenuesAPI.md#Venues1) | **Get** /api/v1/venues/{venueId} | View venue info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Venues
|
||||||
|
|
||||||
|
> Venues(ctx, venueId).VenueIds(venueIds).LeagueId(leagueId).LeagueIds(leagueIds).GameType(gameType).GameTypes(gameTypes).Season(season).Seasons(seasons).Fields(fields).Active(active).IncludeEvents(includeEvents).SportId(sportId).SportIds(sportIds).Execute()
|
||||||
|
|
||||||
|
View venue info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
venueId := TODO // interface{} | Unique Venue Identifier
|
||||||
|
venueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
active := TODO // interface{} | Whether or not a player is active (optional)
|
||||||
|
includeEvents := TODO // interface{} | (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.VenuesAPI.Venues(context.Background(), venueId).VenueIds(venueIds).LeagueId(leagueId).LeagueIds(leagueIds).GameType(gameType).GameTypes(gameTypes).Season(season).Seasons(seasons).Fields(fields).Active(active).IncludeEvents(includeEvents).SportId(sportId).SportIds(sportIds).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `VenuesAPI.Venues``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiVenuesRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique venue identifiers |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**active** | [**interface{}**](interface{}.md) | Whether or not a player is active |
|
||||||
|
**includeEvents** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## Venues1
|
||||||
|
|
||||||
|
> Venues1(ctx, venueId).VenueIds(venueIds).LeagueId(leagueId).LeagueIds(leagueIds).GameType(gameType).GameTypes(gameTypes).Season(season).Seasons(seasons).Fields(fields).Active(active).IncludeEvents(includeEvents).SportId(sportId).SportIds(sportIds).Execute()
|
||||||
|
|
||||||
|
View venue info
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
venueId := TODO // interface{} | Unique Venue Identifier
|
||||||
|
venueIds := TODO // interface{} | Comma delimited list of Unique venue identifiers (optional)
|
||||||
|
leagueId := TODO // interface{} | Unique League Identifier (optional)
|
||||||
|
leagueIds := TODO // interface{} | Comma delimited list of Unique league identifiers (optional)
|
||||||
|
gameType := TODO // interface{} | Type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
gameTypes := TODO // interface{} | Comma delimited list of type of Game. Available types in /api/v1/gameTypes (optional)
|
||||||
|
season := TODO // interface{} | Season of play (optional)
|
||||||
|
seasons := TODO // interface{} | Comma delimited list of Seasons of play (optional)
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
active := TODO // interface{} | Whether or not a player is active (optional)
|
||||||
|
includeEvents := TODO // interface{} | (optional)
|
||||||
|
sportId := TODO // interface{} | Top level organization of a sport (optional)
|
||||||
|
sportIds := TODO // interface{} | Comma delimited list of top level organizations of a sport (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.VenuesAPI.Venues1(context.Background(), venueId).VenueIds(venueIds).LeagueId(leagueId).LeagueIds(leagueIds).GameType(gameType).GameTypes(gameTypes).Season(season).Seasons(seasons).Fields(fields).Active(active).IncludeEvents(includeEvents).SportId(sportId).SportIds(sportIds).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `VenuesAPI.Venues1``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiVenues1Request struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**venueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique venue identifiers |
|
||||||
|
**leagueId** | [**interface{}**](interface{}.md) | Unique League Identifier |
|
||||||
|
**leagueIds** | [**interface{}**](interface{}.md) | Comma delimited list of Unique league identifiers |
|
||||||
|
**gameType** | [**interface{}**](interface{}.md) | Type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**gameTypes** | [**interface{}**](interface{}.md) | Comma delimited list of type of Game. Available types in /api/v1/gameTypes |
|
||||||
|
**season** | [**interface{}**](interface{}.md) | Season of play |
|
||||||
|
**seasons** | [**interface{}**](interface{}.md) | Comma delimited list of Seasons of play |
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
**active** | [**interface{}**](interface{}.md) | Whether or not a player is active |
|
||||||
|
**includeEvents** | [**interface{}**](interface{}.md) | |
|
||||||
|
**sportId** | [**interface{}**](interface{}.md) | Top level organization of a sport |
|
||||||
|
**sportIds** | [**interface{}**](interface{}.md) | Comma delimited list of top level organizations of a sport |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,298 @@
|
||||||
|
# \WeatherAPI
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**WeatherBasic**](WeatherAPI.md#WeatherBasic) | **Get** /api/v1/weather/venues/{venueId}/basic | Get basic weather for a venue.
|
||||||
|
[**WeatherDataBasedOnPlay**](WeatherAPI.md#WeatherDataBasedOnPlay) | **Get** /api/v1/weather/game/{gamePk}/{playId} | Get the raw field weather data.
|
||||||
|
[**WeatherForecast**](WeatherAPI.md#WeatherForecast) | **Get** /api/v1/weather/game/{gamePk}/forecast/{roofType} | Get the weather forecast for a game.
|
||||||
|
[**WeatherFull**](WeatherAPI.md#WeatherFull) | **Get** /api/v1/weather/venues/{venueId}/full | Get full weather for a venue.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## WeatherBasic
|
||||||
|
|
||||||
|
> WeatherBasic(ctx, venueId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get basic weather for a venue.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
venueId := TODO // interface{} | Unique Venue Identifier
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.WeatherAPI.WeatherBasic(context.Background(), venueId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherBasic``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiWeatherBasicRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## WeatherDataBasedOnPlay
|
||||||
|
|
||||||
|
> WeatherDataBasedOnPlay(ctx, gamePk, playId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the raw field weather data.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
playId := TODO // interface{} | Unique identifier for a play within a game
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.WeatherAPI.WeatherDataBasedOnPlay(context.Background(), gamePk, playId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherDataBasedOnPlay``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**playId** | [**interface{}**](.md) | Unique identifier for a play within a game |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiWeatherDataBasedOnPlayRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## WeatherForecast
|
||||||
|
|
||||||
|
> WeatherForecast(ctx, gamePk, roofType).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get the weather forecast for a game.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
gamePk := TODO // interface{} | Unique Primary Key Representing a Game
|
||||||
|
roofType := TODO // interface{} | Venue roof type
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.WeatherAPI.WeatherForecast(context.Background(), gamePk, roofType).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherForecast``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**gamePk** | [**interface{}**](.md) | Unique Primary Key Representing a Game |
|
||||||
|
**roofType** | [**interface{}**](.md) | Venue roof type |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiWeatherForecastRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## WeatherFull
|
||||||
|
|
||||||
|
> WeatherFull(ctx, venueId).Fields(fields).Execute()
|
||||||
|
|
||||||
|
Get full weather for a venue.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
openapiclient "//"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
venueId := TODO // interface{} | Unique Venue Identifier
|
||||||
|
fields := TODO // interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute (optional)
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
r, err := apiClient.WeatherAPI.WeatherFull(context.Background(), venueId).Fields(fields).Execute()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Error when calling `WeatherAPI.WeatherFull``: %v\n", err)
|
||||||
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Path Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**venueId** | [**interface{}**](.md) | Unique Venue Identifier |
|
||||||
|
|
||||||
|
### Other Parameters
|
||||||
|
|
||||||
|
Other parameters are passed through a pointer to a apiWeatherFullRequest struct via the builder pattern
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
**fields** | [**interface{}**](interface{}.md) | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models)
|
||||||
|
[[Back to README]](../README.md)
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Official API for Major League Baseball.
|
||||||
|
|
||||||
|
API version: 2.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
// APIResponse stores the API response returned by the server.
|
||||||
|
type APIResponse struct {
|
||||||
|
*http.Response `json:"-"`
|
||||||
|
Message string `json:"message,omitempty"`
|
||||||
|
// Operation is the name of the OpenAPI operation.
|
||||||
|
Operation string `json:"operation,omitempty"`
|
||||||
|
// RequestURL is the request URL. This value is always available, even if the
|
||||||
|
// embedded *http.Response is nil.
|
||||||
|
RequestURL string `json:"url,omitempty"`
|
||||||
|
// Method is the HTTP method used for the request. This value is always
|
||||||
|
// available, even if the embedded *http.Response is nil.
|
||||||
|
Method string `json:"method,omitempty"`
|
||||||
|
// Payload holds the contents of the response body (which may be nil or empty).
|
||||||
|
// This is provided here as the raw response.Body() reader will have already
|
||||||
|
// been drained.
|
||||||
|
Payload []byte `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAPIResponse returns a new APIResponse object.
|
||||||
|
func NewAPIResponse(r *http.Response) *APIResponse {
|
||||||
|
|
||||||
|
response := &APIResponse{Response: r}
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
|
||||||
|
func NewAPIResponseWithError(errorMessage string) *APIResponse {
|
||||||
|
|
||||||
|
response := &APIResponse{Message: errorMessage}
|
||||||
|
return response
|
||||||
|
}
|
|
@ -0,0 +1,156 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing AnalyticsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_AnalyticsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService ContextMetrics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var guid interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.ContextMetrics(context.Background(), gamePk, guid).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService ContextMetricsWithAverages", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var guid interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.ContextMetricsWithAverages(context.Background(), gamePk, guid).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService ContextMetricsWithAveragesPost", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var guid interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.ContextMetricsWithAveragesPost(context.Background(), gamePk, guid).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService GameGuids", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.GameGuids(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService GameGuidsFromPostgresRange", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRange(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService GameGuidsFromPostgresRangeByGame", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.GameGuidsFromPostgresRangeByGame(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService GameLastPitch", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.GameLastPitch(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService HomeRunBallparks", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var guid interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.HomeRunBallparks(context.Background(), gamePk, guid).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AnalyticsAPIService ParsedJsonFormattedAnalytics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var guid interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AnalyticsAPI.ParsedJsonFormattedAnalytics(context.Background(), gamePk, guid).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing AttendanceAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_AttendanceAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test AttendanceAPIService GetTeamAttendance", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AttendanceAPI.GetTeamAttendance(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing AwardsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_AwardsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test AwardsAPIService AwardRecipients", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var awardId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AwardsAPI.AwardRecipients(context.Background(), awardId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AwardsAPIService Awards", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var awardId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AwardsAPI.Awards(context.Background(), awardId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test AwardsAPIService Awards1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var awardId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.AwardsAPI.Awards1(context.Background(), awardId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing BatTrackingAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_BatTrackingAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test BatTrackingAPIService BatTracking", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var playId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.BatTrackingAPI.BatTracking(context.Background(), gamePk, playId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing BiomechanicsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_BiomechanicsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test BiomechanicsAPIService Biomechanical", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var playId interface{}
|
||||||
|
var positionId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.BiomechanicsAPI.Biomechanical(context.Background(), gamePk, playId, positionId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing BroadcastAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_BroadcastAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test BroadcastAPIService GetAllBroadcasters", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.BroadcastAPI.GetAllBroadcasters(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test BroadcastAPIService GetBroadcasts", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.BroadcastAPI.GetBroadcasts(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing ConferenceAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_ConferenceAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test ConferenceAPIService Conferences", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var conferenceId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ConferenceAPI.Conferences(context.Background(), conferenceId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ConferenceAPIService Conferences1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var conferenceId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ConferenceAPI.Conferences1(context.Background(), conferenceId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing DivisionAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_DivisionAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test DivisionAPIService Divisions", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var divisionId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DivisionAPI.Divisions(context.Background(), divisionId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DivisionAPIService Divisions1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var divisionId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DivisionAPI.Divisions1(context.Background(), divisionId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing DraftAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_DraftAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test DraftAPIService DraftPicks", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var year interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DraftAPI.DraftPicks(context.Background(), year).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DraftAPIService DraftPicks1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var year interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DraftAPI.DraftPicks1(context.Background(), year).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DraftAPIService DraftProspects", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var year interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DraftAPI.DraftProspects(context.Background(), year).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DraftAPIService DraftProspects1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var year interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DraftAPI.DraftProspects1(context.Background(), year).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test DraftAPIService LatestDraftPicks", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var year interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.DraftAPI.LatestDraftPicks(context.Background(), year).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing GamePaceAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_GamePaceAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test GamePaceAPIService GamePace", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GamePaceAPI.GamePace(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,207 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing GameAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_GameAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService Boxscore", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.Boxscore(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService ColorFeed", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.ColorFeed(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService ColorTimestamps", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.ColorTimestamps(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService Content", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.Content(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService CurrentGameStats1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.CurrentGameStats1(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService GetGameContextMetrics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.GetGameContextMetrics(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService GetGameWithMetrics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.GetGameWithMetrics(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService GetWinProbability", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.GetWinProbability(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService Linescore", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.Linescore(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService LiveGameDiffPatchV1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.LiveGameDiffPatchV1(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService LiveGameV1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.LiveGameV1(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService LiveTimestampv11", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.LiveTimestampv11(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test GameAPIService PlayByPlay", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.GameAPI.PlayByPlay(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing HighLowAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_HighLowAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test HighLowAPIService HighLow", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var highLowType interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HighLowAPI.HighLow(context.Background(), highLowType).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HighLowAPIService HighLowStats", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HighLowAPI.HighLowStats(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing HomerunDerbyAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_HomerunDerbyAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyBracket", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyBracket1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket1(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyBracket2", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket2(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyBracket3", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyBracket3(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyMixedMode", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyMixedMode(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyMixedMode1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyMixedMode1(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyPool", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyPool(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test HomerunDerbyAPIService HomeRunDerbyPool1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.HomerunDerbyAPI.HomeRunDerbyPool1(context.Background(), gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,97 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing JobAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_JobAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test JobAPIService Datacasters", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.JobAPI.Datacasters(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test JobAPIService GetJobsByType", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.JobAPI.GetJobsByType(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test JobAPIService OfficialScorers", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.JobAPI.OfficialScorers(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test JobAPIService UmpireSchedule", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var umpireId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.JobAPI.UmpireSchedule(context.Background(), umpireId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test JobAPIService Umpires", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.JobAPI.Umpires(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,196 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing LeagueAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_LeagueAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarBallot", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarBallot(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarBallot1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarBallot1(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarBallot2", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarBallot2(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarBallot3", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarBallot3(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarFinalVote", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarFinalVote(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarFinalVote1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarFinalVote1(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarWriteIns", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarWriteIns(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService AllStarWriteIns1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.AllStarWriteIns1(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService League", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.League(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService League1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.League1(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService League2", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.League2(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test LeagueAPIService League3", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var leagueId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.LeagueAPI.League3(context.Background(), leagueId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing MilestonesAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_MilestonesAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService AchievementStatuses", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.AchievementStatuses(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService MilestoneDurations", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.MilestoneDurations(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService MilestoneLookups", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.MilestoneLookups(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService MilestoneStatistics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.MilestoneStatistics(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService MilestoneTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.MilestoneTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MilestonesAPIService Milestones", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MilestonesAPI.Milestones(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,656 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing MiscAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_MiscAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService AggregateSortEnum", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.AggregateSortEnum(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService BaseballStats", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.BaseballStats(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService BroadcastAvailabilityTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.BroadcastAvailabilityTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService CoachingVideoTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.CoachingVideoTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService EventStatus", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.EventStatus(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService EventTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.EventTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService FielderDetailTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.FielderDetailTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService FreeGameTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.FreeGameTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService GameStatus", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.GameStatus(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService GameTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.GameTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService GamedayTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.GamedayTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService GetLookupValues", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.GetLookupValues(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService GroupByTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.GroupByTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService HitTrajectories", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.HitTrajectories(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService JobTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.JobTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService Languages", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.Languages(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService LeagueLeaderTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.LeagueLeaderTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService LogicalEvents", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.LogicalEvents(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService MediaStateTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.MediaStateTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService Metrics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.Metrics(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService MoundVisitTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.MoundVisitTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService PerformerTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.PerformerTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService PitchCodes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.PitchCodes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService PitchTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.PitchTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService Platforms", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.Platforms(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService PlayerStatusCodes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.PlayerStatusCodes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService Positions", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.Positions(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService ReviewReasons", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.ReviewReasons(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService RoofTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.RoofTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService RosterTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.RosterTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService RuleSettings", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.RuleSettings(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService RunnerDetailTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.RunnerDetailTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService ScheduleEventTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.ScheduleEventTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService ScheduleTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.ScheduleTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService SitCodes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.SitCodes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService Sky", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.Sky(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StandingsTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StandingsTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatFields", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatFields(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatGroups", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatGroups(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatSearchConfig", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatSearchConfig(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatSearchGroupByTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatSearchGroupByTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatSearchParams", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatSearchParams(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatSearchStats", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatSearchStats(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService StatcastPositionTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.StatcastPositionTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService TrackingSoftwareVersions", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.TrackingSoftwareVersions(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService TrackingSystemOwners", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.TrackingSystemOwners(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService TrackingVendors", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.TrackingVendors(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService TrackingVersions", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.TrackingVersions(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService TransactionTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.TransactionTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService UpdateGameStatuses", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.UpdateGameStatuses(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService UpdateJobTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.UpdateJobTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService VideoResolutionTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.VideoResolutionTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService ViolationTypes", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.ViolationTypes(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService WeatherTrajectoryConfidences", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.WeatherTrajectoryConfidences(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test MiscAPIService WindDirection", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.MiscAPI.WindDirection(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,152 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing PersonAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_PersonAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService Award", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.Award(context.Background(), personId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService CurrentGameStats", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.CurrentGameStats(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService FreeAgents", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.FreeAgents(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService Person", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.Person(context.Background(), personId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService Person1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.Person1(context.Background(), personId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService PlayerGameStats", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
var gamePk interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.PlayerGameStats(context.Background(), personId, gamePk).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService Search", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.Search(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService Stats3", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.Stats3(context.Background(), personId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PersonAPIService StatsMetrics", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var personId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PersonAPI.StatsMetrics(context.Background(), personId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing PredictionsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_PredictionsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test PredictionsAPIService GetProps", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PredictionsAPI.GetProps(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test PredictionsAPIService GetPropsAdjust", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.PredictionsAPI.GetPropsAdjust(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing ReviewsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_ReviewsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test ReviewsAPIService GetReviewInfo", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ReviewsAPI.GetReviewInfo(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,117 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing ScheduleAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_ScheduleAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService PostseasonSchedule", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.PostseasonSchedule(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService PostseasonScheduleSeries", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.PostseasonScheduleSeries(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService Schedule", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.Schedule(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService Schedule1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.Schedule1(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService TieGames", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.TieGames(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService TrackingEventsSchedule", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.TrackingEventsSchedule(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test ScheduleAPIService TuneIn", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.ScheduleAPI.TuneIn(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing SeasonAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_SeasonAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test SeasonAPIService AllSeasons", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SeasonAPI.AllSeasons(context.Background()).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SeasonAPIService Seasons", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var seasonId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SeasonAPI.Seasons(context.Background(), seasonId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SeasonAPIService Seasons1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var seasonId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SeasonAPI.Seasons1(context.Background(), seasonId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing SkeletalAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_SkeletalAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test SkeletalAPIService SkeletalChunked", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var playId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SkeletalAPI.SkeletalChunked(context.Background(), gamePk, playId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SkeletalAPIService SkeletalDataFileNames", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var gamePk interface{}
|
||||||
|
var playId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SkeletalAPI.SkeletalDataFileNames(context.Background(), gamePk, playId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
Testing SportsAPIService
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
openapiclient "//"
|
||||||
|
"context"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Test_api_SportsAPIService(t *testing.T) {
|
||||||
|
|
||||||
|
configuration := openapiclient.NewConfiguration()
|
||||||
|
apiClient := openapiclient.NewAPIClient(configuration)
|
||||||
|
|
||||||
|
t.Run("Test SportsAPIService AllSportBallot", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var sportId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SportsAPI.AllSportBallot(context.Background(), sportId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SportsAPIService SportPlayers", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var sportId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SportsAPI.SportPlayers(context.Background(), sportId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SportsAPIService Sports", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var sportId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SportsAPI.Sports(context.Background(), sportId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("Test SportsAPIService Sports1", func(t *testing.T) {
|
||||||
|
|
||||||
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
|
var sportId interface{}
|
||||||
|
|
||||||
|
httpRes, err := apiClient.SportsAPI.Sports1(context.Background(), sportId).Execute()
|
||||||
|
|
||||||
|
require.Nil(t, err)
|
||||||
|
assert.Equal(t, 200, httpRes.StatusCode)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue