162 lines
5.7 KiB
Markdown
162 lines
5.7 KiB
Markdown
|
# \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)
|
||
|
|