3.3 KiB
3.3 KiB
{{classname}}
All URIs are relative to https://statsapi.mlb.com
Method | HTTP request | Description |
---|---|---|
GetStreaks | Get /api/v1/streaks | View streaks |
StreakTypes | Get /api/v1/streaks/types | View streaks parameter options |
GetStreaks
StreaksWrapperRestObject GetStreaks(ctx, optional) View streaks
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *StreaksApiGetStreaksOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a StreaksApiGetStreaksOpts struct
Name | Type | Description | Notes |
---|---|---|---|
streakOrg | optional.Interface of OrganizationType | ||
streakStat | **optional.Interface of []StreakStatEnum** | ||
streakSpan | optional.Interface of StreakSpanEnum | ||
streakLevel | optional.Interface of StreakLevelEnum | ||
streakThreshold | optional.Int32 | ||
inverse | optional.Bool | ||
startersOnly | optional.Bool | ||
statGroup | **optional.Interface of []StatGroup** | Category of statistic to return. Available types in /api/v1/statGroups | |
gameType | **optional.Interface of []GameTypeEnum** | Type of Game. Available types in /api/v1/gameTypes | |
season | **optional.Interface of []string** | Season of play | |
teamId | **optional.Interface of []int32** | Unique Team Identifier. Format: 141, 147, etc | |
leagueId | **optional.Interface of []int32** | Unique League Identifier | |
sportId | **optional.Interface of []int32** | Top level organization of a sport | |
activeStreak | optional.Bool | Whether or not a player is active | |
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 | |
playerId | **optional.Interface of []int32** | A unique identifier for a player |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StreakTypes
map[string][]interface{} StreakTypes(ctx, ) View streaks parameter 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]