ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.4

This commit is contained in:
speakeasybot
2024-02-24 00:42:08 +00:00
parent f812f82747
commit 0118475c63
61 changed files with 1254 additions and 1001 deletions

View File

@@ -29,7 +29,11 @@ func newVideo(sdkConfig sdkConfiguration) *Video {
// GetTimeline - Get the timeline for a media item
// Get the timeline for a media item
func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineRequest) (*operations.GetTimelineResponse, error) {
hookCtx := hooks.HookContext{OperationID: "getTimeline"}
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTimeline",
SecuritySource: s.sdkConfiguration.Security,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := url.JoinPath(baseURL, "/:/timeline")
@@ -48,13 +52,13 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
return nil, fmt.Errorf("error populating query params: %w", err)
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req)
client := s.sdkConfiguration.SecurityClient
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
@@ -63,15 +67,15 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err)
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil)
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes)
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}
@@ -120,7 +124,11 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
// StartUniversalTranscode - Start Universal Transcode
// Begin a Universal Transcode Session
func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.StartUniversalTranscodeRequest) (*operations.StartUniversalTranscodeResponse, error) {
hookCtx := hooks.HookContext{OperationID: "startUniversalTranscode"}
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "startUniversalTranscode",
SecuritySource: s.sdkConfiguration.Security,
}
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
opURL, err := url.JoinPath(baseURL, "/video/:/transcode/universal/start.mpd")
@@ -139,13 +147,13 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
return nil, fmt.Errorf("error populating query params: %w", err)
}
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{hookCtx}, req)
client := s.sdkConfiguration.SecurityClient
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, err
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil || httpRes == nil {
if err != nil {
@@ -154,15 +162,15 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
err = fmt.Errorf("error sending request: no response")
}
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, nil, err)
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
return nil, err
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{hookCtx}, httpRes, nil)
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
if err != nil {
return nil, err
}
} else {
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{hookCtx}, httpRes)
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
if err != nil {
return nil, err
}