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.405.6
This commit is contained in:
25
plex.go
25
plex.go
@@ -1008,7 +1008,7 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope
|
||||
|
||||
// GetServerResources - Get Server Resources
|
||||
// Get Plex server access tokens and server connections
|
||||
func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations.IncludeHTTPS, includeRelay *operations.IncludeRelay, includeIPv6 *operations.IncludeIPv6, opts ...operations.Option) (*operations.GetServerResourcesResponse, error) {
|
||||
func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations.IncludeHTTPS, includeRelay *operations.IncludeRelay, includeIPv6 *operations.IncludeIPv6, clientID *string, opts ...operations.Option) (*operations.GetServerResourcesResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-server-resources",
|
||||
@@ -1020,6 +1020,11 @@ func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations.
|
||||
IncludeHTTPS: includeHTTPS,
|
||||
IncludeRelay: includeRelay,
|
||||
IncludeIPv6: includeIPv6,
|
||||
ClientID: clientID,
|
||||
}
|
||||
|
||||
globals := operations.GetServerResourcesGlobals{
|
||||
ClientID: s.sdkConfiguration.Globals.ClientID,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
@@ -1063,7 +1068,7 @@ func (s *Plex) GetServerResources(ctx context.Context, includeHTTPS *operations.
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
}
|
||||
|
||||
@@ -1497,7 +1502,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
|
||||
|
||||
// GetTokenByPinID - Get Access Token by PinId
|
||||
// Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
||||
func (s *Plex) GetTokenByPinID(ctx context.Context, pinID int64, opts ...operations.Option) (*operations.GetTokenByPinIDResponse, error) {
|
||||
func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenByPinIDRequest, opts ...operations.Option) (*operations.GetTokenByPinIDResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getTokenByPinId",
|
||||
@@ -1505,8 +1510,12 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, pinID int64, opts ...operati
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
request := operations.GetTokenByPinIDRequest{
|
||||
PinID: pinID,
|
||||
globals := operations.GetTokenByPinIDGlobals{
|
||||
ClientID: s.sdkConfiguration.Globals.ClientID,
|
||||
ClientName: s.sdkConfiguration.Globals.ClientName,
|
||||
DeviceName: s.sdkConfiguration.Globals.DeviceName,
|
||||
ClientVersion: s.sdkConfiguration.Globals.ClientVersion,
|
||||
ClientPlatform: s.sdkConfiguration.Globals.ClientPlatform,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
@@ -1527,7 +1536,7 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, pinID int64, opts ...operati
|
||||
baseURL = *o.ServerURL
|
||||
}
|
||||
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/pins/{pinID}", request, nil)
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/pins/{pinID}", request, globals)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
@@ -1550,6 +1559,10 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, pinID int64, opts ...operati
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, globals); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
}
|
||||
|
||||
globalRetryConfig := s.sdkConfiguration.RetryConfig
|
||||
retryConfig := o.Retries
|
||||
if retryConfig == nil {
|
||||
|
||||
Reference in New Issue
Block a user