This commit is contained in:
filifa
2025-04-06 22:14:30 -04:00
parent 5bfec4d5d9
commit 003f7b1309
68 changed files with 2991 additions and 3026 deletions
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// AnalyticsAPIService AnalyticsAPI service
type AnalyticsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// AttendanceAPIService AttendanceAPI service
type AttendanceAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// AwardsAPIService AwardsAPI service
type AwardsAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// BatTrackingAPIService BatTrackingAPI service
type BatTrackingAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// BiomechanicsAPIService BiomechanicsAPI service
type BiomechanicsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// BroadcastAPIService BroadcastAPI service
type BroadcastAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// ConferenceAPIService ConferenceAPI service
type ConferenceAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// DivisionAPIService DivisionAPI service
type DivisionAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// DraftAPIService DraftAPI service
type DraftAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// GameAPIService GameAPI service
type GameAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// GamePaceAPIService GamePaceAPI service
type GamePaceAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// HighLowAPIService HighLowAPI service
type HighLowAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// HomerunDerbyAPIService HomerunDerbyAPI service
type HomerunDerbyAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// JobAPIService JobAPI service
type JobAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// LeagueAPIService LeagueAPI service
type LeagueAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// MilestonesAPIService MilestonesAPI service
type MilestonesAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// MiscAPIService MiscAPI service
type MiscAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// PersonAPIService PersonAPI service
type PersonAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// PredictionsAPIService PredictionsAPI service
type PredictionsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// ReviewsAPIService ReviewsAPI service
type ReviewsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// ScheduleAPIService ScheduleAPI service
type ScheduleAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// SeasonAPIService SeasonAPI service
type SeasonAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// SkeletalAPIService SkeletalAPI service
type SkeletalAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// SportsAPIService SportsAPI service
type SportsAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// StandingsAPIService StandingsAPI service
type StandingsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// StatsAPIService StatsAPI service
type StatsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// StreaksAPIService StreaksAPI service
type StreaksAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// TeamsAPIService TeamsAPI service
type TeamsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// TransactionsAPIService TransactionsAPI service
type TransactionsAPIService service
-1
View File
@@ -18,7 +18,6 @@ import (
"net/url"
)
// UniformsAPIService UniformsAPI service
type UniformsAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// VenuesAPIService VenuesAPI service
type VenuesAPIService service
-1
View File
@@ -19,7 +19,6 @@ import (
"strings"
)
// WeatherAPIService WeatherAPI service
type WeatherAPIService service
+9 -10
View File
@@ -31,14 +31,13 @@ import (
"strings"
"time"
"unicode/utf8"
)
var (
JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" )
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
)
// APIClient manages communication with the Stats API Documentation API v2.0.0
@@ -218,7 +217,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error {
return nil
}
func parameterValueToString( obj interface{}, key string ) string {
func parameterValueToString(obj interface{}, key string) string {
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok {
return fmt.Sprintf("%v", actualObj.GetActualInstanceValue())
@@ -226,11 +225,11 @@ func parameterValueToString( obj interface{}, key string ) string {
return fmt.Sprintf("%v", obj)
}
var param,ok = obj.(MappedNullable)
var param, ok = obj.(MappedNullable)
if !ok {
return ""
}
dataMap,err := param.ToMap()
dataMap, err := param.ToMap()
if err != nil {
return ""
}
@@ -250,8 +249,8 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri
value = "invalid"
case reflect.Struct:
if t,ok := obj.(MappedNullable); ok {
dataMap,err := t.ToMap()
if t, ok := obj.(MappedNullable); ok {
dataMap, err := t.ToMap()
if err != nil {
return
}
@@ -269,7 +268,7 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri
return
}
var lenIndValue = indValue.Len()
for i:=0;i<lenIndValue;i++ {
for i := 0; i < lenIndValue; i++ {
var arrayValue = indValue.Index(i)
var keyPrefixForCollectionType = keyPrefix