6.6 KiB
{{classname}}
All URIs are relative to https://statsapi.mlb.com
Method | HTTP request | Description |
---|---|---|
AchievementStatuses | Get /api/v1/achievementStatuses | View available achievementStatus options |
MilestoneDurations | Get /api/v1/milestoneDurations | View available milestoneDurations options |
MilestoneLookups | Get /api/v1/milestoneLookups | View available milestoneLookup options |
MilestoneStatistics | Get /api/v1/milestoneStatistics | View available milestone statistics options |
MilestoneTypes | Get /api/v1/milestoneTypes | View available milestoneType options |
Milestones | Get /api/v1/milestones | View pending and achieved milestones. |
AchievementStatuses
[]MilestoneAchievementType AchievementStatuses(ctx, ) View available achievementStatus options
Required Parameters
This endpoint does not need any parameter.
Return type
**[]MilestoneAchievementType**
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MilestoneDurations
[]MilestoneDuration MilestoneDurations(ctx, ) View available milestoneDurations options
Required Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MilestoneLookups
map[string][]interface{} MilestoneLookups(ctx, ) View available milestoneLookup options
Required Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MilestoneStatistics
[]MilestoneStatisticRestObject MilestoneStatistics(ctx, ) View available milestone statistics options
Required Parameters
This endpoint does not need any parameter.
Return type
**[]MilestoneStatisticRestObject**
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MilestoneTypes
[]MilestoneType MilestoneTypes(ctx, ) View available milestoneType options
Required Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Milestones
MilestoneContainerRestObject Milestones(ctx, optional) View pending and achieved milestones.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *MilestonesApiMilestonesOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a MilestonesApiMilestonesOpts struct
Name | Type | Description | Notes |
---|---|---|---|
orgType | optional.Interface of OrganizationType | Organization level. Format: T(Team), L(League), S(Sport) | |
achievementStatuses | **optional.Interface of []MilestoneAchievementType** | Comma delimited list of milestone achievement types | |
milestoneTypes | **optional.Interface of []MilestoneType** | Comma delimited list of milestone types | |
isLastAchievement | optional.Bool | Filters out milestones that have already been surpassed. | |
milestoneStatistics | **optional.Interface of []Statistic** | Comma delimited list of milestone statistics | |
milestoneValues | **optional.Interface of []int32** | Comma delimited list of milestone values | |
playerIds | **optional.Interface of []int32** | A unique identifier for players | |
teamIds | **optional.Interface of []int32** | Comma delimited list of Unique Team identifiers | |
leagueIds | **optional.Interface of []int32** | Comma delimited list of Unique league identifiers | |
statGroup | optional.Interface of StatGroup | Category of statistic to return. Available types in /api/v1/statGroups | |
season | optional.String | Season of play | |
seasons | **optional.Interface of []string** | Comma delimited list of Seasons of play | |
venueIds | **optional.Interface of []int32** | Comma delimited list of Unique venue identifiers | |
gamePks | **optional.Interface of []int32** | Comma delimited list of unique primary keys | |
limit | optional.Int32 | Number of results to return | |
fields | **optional.Interface of []string** | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | |
showFirsts | optional.Bool | True to show play first milestones, like first HR, first Save, etc |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]