5.7 KiB
\StreaksAPI
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
GetStreaks | Get /api/v1/streaks | View streaks |
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
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{} | ||
streakStat | interface{} | ||
streakSpan | interface{} | ||
streakLevel | interface{} | ||
streakThreshold | interface{} | ||
inverse | interface{} | ||
startersOnly | interface{} | ||
statGroup | interface{} | Category of statistic to return. Available types in /api/v1/statGroups | |
gameType | interface{} | Type of Game. Available types in /api/v1/gameTypes | |
season | interface{} | Season of play | |
teamId | interface{} | Unique Team Identifier. Format: 141, 147, etc | |
leagueId | interface{} | Unique League Identifier | |
sportId | interface{} | Top level organization of a sport | |
activeStreak | interface{} | Whether or not a player is active | |
limit | interface{} | Number of results to return | |
fields | interface{} | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | |
playerId | interface{} | 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] [Back to Model list] [Back to README]
StreakTypes
StreakTypes(ctx).Execute()
View streaks parameter options
Example
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] [Back to Model list] [Back to README]