2025-04-06 23:39:04 +00:00
|
|
|
/*
|
|
|
|
Stats API Documentation
|
|
|
|
|
|
|
|
Testing AnalyticsAPIService
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
|
|
|
|
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
2025-04-07 02:14:30 +00:00
|
|
|
openapiclient "//"
|
2025-04-06 23:39:04 +00:00
|
|
|
"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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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) {
|
|
|
|
|
2025-04-07 02:14:30 +00:00
|
|
|
t.Skip("skip test") // remove to run test
|
2025-04-06 23:39:04 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|