mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.406.0
This commit is contained in:
49
hubs.go
49
hubs.go
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/LukeHagar/plexgo/internal/utils"
|
||||
"github.com/LukeHagar/plexgo/models/operations"
|
||||
"github.com/LukeHagar/plexgo/models/sdkerrors"
|
||||
"github.com/LukeHagar/plexgo/retry"
|
||||
"github.com/cenkalti/backoff/v4"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -91,6 +92,16 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
|
||||
if retryConfig == nil {
|
||||
if globalRetryConfig != nil {
|
||||
retryConfig = globalRetryConfig
|
||||
} else {
|
||||
retryConfig = &retry.Config{
|
||||
Strategy: "backoff", Backoff: &retry.BackoffStrategy{
|
||||
InitialInterval: 500,
|
||||
MaxInterval: 60000,
|
||||
Exponent: 1.5,
|
||||
MaxElapsedTime: 3600000,
|
||||
},
|
||||
RetryConnectionErrors: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,11 +110,7 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
|
||||
httpRes, err = utils.Retry(ctx, utils.Retries{
|
||||
Config: retryConfig,
|
||||
StatusCodes: []string{
|
||||
"429",
|
||||
"500",
|
||||
"502",
|
||||
"503",
|
||||
"504",
|
||||
"5XX",
|
||||
},
|
||||
}, func() (*http.Response, error) {
|
||||
if req.Body != nil {
|
||||
@@ -337,6 +344,16 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen
|
||||
if retryConfig == nil {
|
||||
if globalRetryConfig != nil {
|
||||
retryConfig = globalRetryConfig
|
||||
} else {
|
||||
retryConfig = &retry.Config{
|
||||
Strategy: "backoff", Backoff: &retry.BackoffStrategy{
|
||||
InitialInterval: 500,
|
||||
MaxInterval: 60000,
|
||||
Exponent: 1.5,
|
||||
MaxElapsedTime: 3600000,
|
||||
},
|
||||
RetryConnectionErrors: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,11 +362,7 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen
|
||||
httpRes, err = utils.Retry(ctx, utils.Retries{
|
||||
Config: retryConfig,
|
||||
StatusCodes: []string{
|
||||
"429",
|
||||
"500",
|
||||
"502",
|
||||
"503",
|
||||
"504",
|
||||
"5XX",
|
||||
},
|
||||
}, func() (*http.Response, error) {
|
||||
if req.Body != nil {
|
||||
@@ -547,6 +560,16 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo
|
||||
if retryConfig == nil {
|
||||
if globalRetryConfig != nil {
|
||||
retryConfig = globalRetryConfig
|
||||
} else {
|
||||
retryConfig = &retry.Config{
|
||||
Strategy: "backoff", Backoff: &retry.BackoffStrategy{
|
||||
InitialInterval: 500,
|
||||
MaxInterval: 60000,
|
||||
Exponent: 1.5,
|
||||
MaxElapsedTime: 3600000,
|
||||
},
|
||||
RetryConnectionErrors: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,11 +578,7 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo
|
||||
httpRes, err = utils.Retry(ctx, utils.Retries{
|
||||
Config: retryConfig,
|
||||
StatusCodes: []string{
|
||||
"429",
|
||||
"500",
|
||||
"502",
|
||||
"503",
|
||||
"504",
|
||||
"5XX",
|
||||
},
|
||||
}, func() (*http.Response, error) {
|
||||
if req.Body != nil {
|
||||
|
||||
Reference in New Issue
Block a user