Compare commits

..

1 Commits

Author SHA1 Message Date
speakeasybot
33fe0755b5 ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4 2025-03-08 00:09:26 +00:00
50 changed files with 2966 additions and 792 deletions

File diff suppressed because one or more lines are too long

View File

@@ -7,13 +7,15 @@ generation:
useClassNamesForArrayFields: true useClassNamesForArrayFields: true
fixes: fixes:
nameResolutionDec2023: true nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true requestResponseComponentNamesFeb2024: true
securityFeb2025: false
auth: auth:
oAuth2ClientCredentialsEnabled: true oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false oAuth2PasswordEnabled: false
go: go:
version: 0.19.0 version: 0.19.1
additionalDependencies: {} additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true clientServerStatusCodesAsErrors: true

View File

@@ -1,4 +1,4 @@
speakeasyVersion: 1.488.0 speakeasyVersion: 1.513.4
sources: sources:
my-source: my-source:
sourceNamespace: my-source sourceNamespace: my-source
@@ -9,19 +9,19 @@ sources:
- main - main
plexapi: plexapi:
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6 sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46 sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1739232555 - speakeasy-sdk-regen-1741392494
targets: targets:
plexgo: plexgo:
source: plexapi source: plexapi
sourceNamespace: plexapi sourceNamespace: plexapi
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6 sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46 sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
codeSamplesNamespace: code-samples-go-plexgo codeSamplesNamespace: code-samples-go-plexgo
codeSamplesRevisionDigest: sha256:96b23ddcc80db35c9852b114146c3be99c47b4375338f8d605199a53c0498cc8 codeSamplesRevisionDigest: sha256:01609ce90e3ede4fb9713410186aab8747cf7992930126be0a0e4af56761e5e0
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: latest speakeasyVersion: latest

View File

@@ -397,13 +397,48 @@ func main() {
### Server Variables ### Server Variables
The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following options are available when initializing the SDK client instance: The default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following options are available when initializing the SDK client instance:
* `WithProtocol(protocol ServerProtocol)`
* `WithIP(ip string)` | Variable | Option | Supported Values | Default | Description |
* `WithPort(port string)` | ---------- | --------------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
| `protocol` | `WithProtocol(protocol ServerProtocol)` | - `"http"`<br/>- `"https"` | `"https"` | The protocol to use for the server connection |
| `ip` | `WithIP(ip string)` | string | `"10.10.10.47"` | The IP address or hostname of your Plex Server |
| `port` | `WithPort(port string)` | string | `"32400"` | The port of your Plex Server |
#### Example
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithProtocol("https"),
plexgo.WithIP("e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9"),
plexgo.WithPort("40311"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Server.GetServerCapabilities(ctx)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
### Override Server URL Per-Client ### Override Server URL Per-Client
The default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example: The default server can be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:
```go ```go
package main package main

View File

@@ -1053,3 +1053,13 @@ Based on:
- [go v0.19.0] . - [go v0.19.0] .
### Releases ### Releases
- [Go v0.19.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.0 - . - [Go v0.19.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.0 - .
## 2025-03-08 00:07:57
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.513.4 (2.545.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.19.1] .
### Releases
- [Go v0.19.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.19.1 - .

View File

@@ -35,13 +35,6 @@ func newActivities(sdkConfig sdkConfiguration) *Activities {
// GetServerActivities - Get Server Activities // GetServerActivities - Get Server Activities
// Get Server Activities // Get Server Activities
func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) { func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations.Option) (*operations.GetServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -65,6 +58,14 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -279,13 +280,6 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
// CancelServerActivities - Cancel Server Activities // CancelServerActivities - Cancel Server Activities
// Cancel Server Activities // Cancel Server Activities
func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string, opts ...operations.Option) (*operations.CancelServerActivitiesResponse, error) { func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID string, opts ...operations.Option) (*operations.CancelServerActivitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "cancelServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.CancelServerActivitiesRequest{ request := operations.CancelServerActivitiesRequest{
ActivityUUID: activityUUID, ActivityUUID: activityUUID,
} }
@@ -313,6 +307,14 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "cancelServerActivities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -29,13 +29,6 @@ func newAuthentication(sdkConfig sdkConfiguration) *Authentication {
// GetTransientToken - Get a Transient Token // GetTransientToken - Get a Transient Token
// This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. // This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted.
func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope, opts ...operations.Option) (*operations.GetTransientTokenResponse, error) { func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations.GetTransientTokenQueryParamType, scope operations.Scope, opts ...operations.Option) (*operations.GetTransientTokenResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTransientToken",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetTransientTokenRequest{ request := operations.GetTransientTokenRequest{
Type: type_, Type: type_,
Scope: scope, Scope: scope,
@@ -64,6 +57,14 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTransientToken",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -263,13 +264,6 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations
// If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. // If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
// Note: requires Plex Media Server >= 1.15.4. // Note: requires Plex Media Server >= 1.15.4.
func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string, opts ...operations.Option) (*operations.GetSourceConnectionInformationResponse, error) { func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, source string, opts ...operations.Option) (*operations.GetSourceConnectionInformationResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSourceConnectionInformation",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSourceConnectionInformationRequest{ request := operations.GetSourceConnectionInformationRequest{
Source: source, Source: source,
} }
@@ -297,6 +291,14 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getSourceConnectionInformation",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -495,13 +497,6 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou
// GetTokenDetails - Get Token Details // GetTokenDetails - Get Token Details
// Get the User data from the provided X-Plex-Token // Get the User data from the provided X-Plex-Token
func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) { func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations.Option) (*operations.GetTokenDetailsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTokenDetails",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -524,6 +519,14 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTokenDetails",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -738,13 +741,6 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
// PostUsersSignInData - Get User Sign In Data // PostUsersSignInData - Get User Sign In Data
// Sign in user with username and password and return user data with Plex authentication token // Sign in user with username and password and return user data with Plex authentication token
func (s *Authentication) PostUsersSignInData(ctx context.Context, request operations.PostUsersSignInDataRequest, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) { func (s *Authentication) PostUsersSignInData(ctx context.Context, request operations.PostUsersSignInDataRequest, opts ...operations.Option) (*operations.PostUsersSignInDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "post-users-sign-in-data",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -767,6 +763,13 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "post-users-sign-in-data",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`) bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "RequestBody", "form", `request:"mediaType=application/x-www-form-urlencoded"`)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@@ -29,13 +29,6 @@ func newButler(sdkConfig sdkConfiguration) *Butler {
// GetButlerTasks - Get Butler tasks // GetButlerTasks - Get Butler tasks
// Returns a list of butler tasks // Returns a list of butler tasks
func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) (*operations.GetButlerTasksResponse, error) { func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option) (*operations.GetButlerTasksResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getButlerTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -59,6 +52,14 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option)
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getButlerTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -277,13 +278,6 @@ func (s *Butler) GetButlerTasks(ctx context.Context, opts ...operations.Option)
// 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. // 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
// 4. If we are outside the configured window, the task will start immediately. // 4. If we are outside the configured window, the task will start immediately.
func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) (*operations.StartAllTasksResponse, error) { func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) (*operations.StartAllTasksResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "startAllTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -307,6 +301,14 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) (
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "startAllTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -501,13 +503,6 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) (
// StopAllTasks - Stop all Butler tasks // StopAllTasks - Stop all Butler tasks
// This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. // This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.
func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (*operations.StopAllTasksResponse, error) { func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (*operations.StopAllTasksResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "stopAllTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -531,6 +526,14 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (*
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "stopAllTasks",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -729,13 +732,6 @@ func (s *Butler) StopAllTasks(ctx context.Context, opts ...operations.Option) (*
// 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. // 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.
// 4. If we are outside the configured window, the task will start immediately. // 4. If we are outside the configured window, the task will start immediately.
func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, opts ...operations.Option) (*operations.StartTaskResponse, error) { func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, opts ...operations.Option) (*operations.StartTaskResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "startTask",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.StartTaskRequest{ request := operations.StartTaskRequest{
TaskName: taskName, TaskName: taskName,
} }
@@ -763,6 +759,14 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "startTask",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -959,13 +963,6 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName, op
// StopTask - Stop a single Butler task // StopTask - Stop a single Butler task
// This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. // This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint.
func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTaskName, opts ...operations.Option) (*operations.StopTaskResponse, error) { func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTaskName, opts ...operations.Option) (*operations.StopTaskResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "stopTask",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.StopTaskRequest{ request := operations.StopTaskRequest{
TaskName: taskName, TaskName: taskName,
} }
@@ -993,6 +990,14 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "stopTask",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,7 @@ Logged in user details
| `Services` | [][operations.Services](../../models/operations/services.md) | :heavy_check_mark: | N/A | | | `Services` | [][operations.Services](../../models/operations/services.md) | :heavy_check_mark: | N/A | |
| `Subscription` | [operations.Subscription](../../models/operations/subscription.md) | :heavy_check_mark: | If the accounts Plex Pass subscription is active | | | `Subscription` | [operations.Subscription](../../models/operations/subscription.md) | :heavy_check_mark: | If the accounts Plex Pass subscription is active | |
| `SubscriptionDescription` | *string* | :heavy_check_mark: | Description of the Plex Pass subscription | | | `SubscriptionDescription` | *string* | :heavy_check_mark: | Description of the Plex Pass subscription | |
| `Subscriptions` | [][operations.GetTokenDetailsSubscription](../../models/operations/gettokendetailssubscription.md) | :heavy_check_mark: | N/A | | | `Subscriptions` | [][operations.GetTokenDetailsSubscription](../../models/operations/gettokendetailssubscription.md) | :heavy_minus_sign: | N/A | |
| `Thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | | `Thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
| `Title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | | `Title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle |
| `TwoFactorEnabled` | **bool* | :heavy_minus_sign: | If two-factor authentication is enabled | | | `TwoFactorEnabled` | **bool* | :heavy_minus_sign: | If two-factor authentication is enabled | |

View File

@@ -41,7 +41,7 @@ Returns the user account data with a valid auth token
| `Services` | [][operations.PostUsersSignInDataServices](../../models/operations/postuserssignindataservices.md) | :heavy_check_mark: | N/A | | | `Services` | [][operations.PostUsersSignInDataServices](../../models/operations/postuserssignindataservices.md) | :heavy_check_mark: | N/A | |
| `Subscription` | [operations.PostUsersSignInDataSubscription](../../models/operations/postuserssignindatasubscription.md) | :heavy_check_mark: | If the accounts Plex Pass subscription is active | | | `Subscription` | [operations.PostUsersSignInDataSubscription](../../models/operations/postuserssignindatasubscription.md) | :heavy_check_mark: | If the accounts Plex Pass subscription is active | |
| `SubscriptionDescription` | *string* | :heavy_check_mark: | Description of the Plex Pass subscription | | | `SubscriptionDescription` | *string* | :heavy_check_mark: | Description of the Plex Pass subscription | |
| `Subscriptions` | [][operations.PostUsersSignInDataAuthenticationSubscription](../../models/operations/postuserssignindataauthenticationsubscription.md) | :heavy_check_mark: | N/A | | | `Subscriptions` | [][operations.PostUsersSignInDataAuthenticationSubscription](../../models/operations/postuserssignindataauthenticationsubscription.md) | :heavy_minus_sign: | N/A | |
| `Thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | | `Thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
| `Title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | | `Title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle |
| `TwoFactorEnabled` | **bool* | :heavy_minus_sign: | If two-factor authentication is enabled | | | `TwoFactorEnabled` | **bool* | :heavy_minus_sign: | If two-factor authentication is enabled | |

45
hubs.go
View File

@@ -29,13 +29,6 @@ func newHubs(sdkConfig sdkConfiguration) *Hubs {
// GetGlobalHubs - Get Global Hubs // GetGlobalHubs - Get Global Hubs
// Get Global Hubs filtered by the parameters provided. // Get Global Hubs filtered by the parameters provided.
func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient *operations.OnlyTransient, opts ...operations.Option) (*operations.GetGlobalHubsResponse, error) { func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient *operations.OnlyTransient, opts ...operations.Option) (*operations.GetGlobalHubsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getGlobalHubs",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetGlobalHubsRequest{ request := operations.GetGlobalHubsRequest{
Count: count, Count: count,
OnlyTransient: onlyTransient, OnlyTransient: onlyTransient,
@@ -64,6 +57,14 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getGlobalHubs",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -282,13 +283,6 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
// GetRecentlyAdded - Get Recently Added // GetRecentlyAdded - Get Recently Added
// This endpoint will return the recently added content. // This endpoint will return the recently added content.
func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecentlyAddedRequest, opts ...operations.Option) (*operations.GetRecentlyAddedResponse, error) { func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecentlyAddedRequest, opts ...operations.Option) (*operations.GetRecentlyAddedResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-recently-added",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -312,6 +306,14 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-recently-added",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -490,13 +492,6 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen
// GetLibraryHubs - Get library specific hubs // GetLibraryHubs - Get library specific hubs
// This endpoint will return a list of library specific hubs // This endpoint will return a list of library specific hubs
func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *float64, onlyTransient *operations.QueryParamOnlyTransient, opts ...operations.Option) (*operations.GetLibraryHubsResponse, error) { func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *float64, onlyTransient *operations.QueryParamOnlyTransient, opts ...operations.Option) (*operations.GetLibraryHubsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getLibraryHubs",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetLibraryHubsRequest{ request := operations.GetLibraryHubsRequest{
SectionID: sectionID, SectionID: sectionID,
Count: count, Count: count,
@@ -526,6 +521,14 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getLibraryHubs",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -24,6 +24,7 @@ type HTTPClient interface {
} }
type HookContext struct { type HookContext struct {
BaseURL string
Context context.Context Context context.Context
OperationID string OperationID string
OAuth2Scopes []string OAuth2Scopes []string

View File

@@ -15,11 +15,15 @@ import (
"github.com/LukeHagar/plexgo/types" "github.com/LukeHagar/plexgo/types"
) )
func populateForm(paramName string, explode bool, objType reflect.Type, objValue reflect.Value, delimiter string, getFieldName func(reflect.StructField) string) url.Values { func populateForm(paramName string, explode bool, objType reflect.Type, objValue reflect.Value, delimiter string, defaultValue *string, getFieldName func(reflect.StructField) string) url.Values {
formValues := url.Values{} formValues := url.Values{}
if isNil(objType, objValue) { if isNil(objType, objValue) {
if defaultValue != nil {
formValues.Add(paramName, *defaultValue)
}
return formValues return formValues
} }

View File

@@ -71,6 +71,8 @@ func populateQueryParams(queryParams interface{}, globals interface{}, values ur
continue continue
} }
defaultValue := parseDefaultTag(fieldType)
if globals != nil { if globals != nil {
var globalFound bool var globalFound bool
fieldType, valType, globalFound = populateFromGlobals(fieldType, valType, queryParamTagKey, globals) fieldType, valType, globalFound = populateFromGlobals(fieldType, valType, queryParamTagKey, globals)
@@ -97,14 +99,14 @@ func populateQueryParams(queryParams interface{}, globals interface{}, values ur
} }
} }
case "form": case "form":
vals := populateFormParams(qpTag, fieldType.Type, valType, ",") vals := populateFormParams(qpTag, fieldType.Type, valType, ",", defaultValue)
for k, v := range vals { for k, v := range vals {
for _, vv := range v { for _, vv := range v {
values.Add(k, vv) values.Add(k, vv)
} }
} }
case "pipeDelimited": case "pipeDelimited":
vals := populateFormParams(qpTag, fieldType.Type, valType, "|") vals := populateFormParams(qpTag, fieldType.Type, valType, "|", defaultValue)
for k, v := range vals { for k, v := range vals {
for _, vv := range v { for _, vv := range v {
values.Add(k, vv) values.Add(k, vv)
@@ -246,8 +248,8 @@ func populateDeepObjectParamsStruct(qsValues url.Values, priorScope string, stru
} }
} }
func populateFormParams(tag *paramTag, objType reflect.Type, objValue reflect.Value, delimiter string) url.Values { func populateFormParams(tag *paramTag, objType reflect.Type, objValue reflect.Value, delimiter string, defaultValue *string) url.Values {
return populateForm(tag.ParamName, tag.Explode, objType, objValue, delimiter, func(fieldType reflect.StructField) string { return populateForm(tag.ParamName, tag.Explode, objType, objValue, delimiter, defaultValue, func(fieldType reflect.StructField) string {
qpTag := parseQueryParamTag(fieldType) qpTag := parseQueryParamTag(fieldType)
if qpTag == nil { if qpTag == nil {
return "" return ""

View File

@@ -292,7 +292,7 @@ func encodeFormData(fieldName string, w io.Writer, data interface{}) error {
switch tag.Style { switch tag.Style {
// TODO: support other styles // TODO: support other styles
case "form": case "form":
values := populateForm(tag.Name, tag.Explode, fieldType, valType, ",", func(sf reflect.StructField) string { values := populateForm(tag.Name, tag.Explode, fieldType, valType, ",", nil, func(sf reflect.StructField) string {
tag := parseFormTag(field) tag := parseFormTag(field)
if tag == nil { if tag == nil {
return "" return ""

View File

@@ -106,6 +106,16 @@ func parseConstTag(field reflect.StructField) *string {
return &value return &value
} }
func parseDefaultTag(field reflect.StructField) *string {
value := field.Tag.Get("default")
if value == "" {
return nil
}
return &value
}
func parseStructTag(tagKey string, field reflect.StructField) map[string]string { func parseStructTag(tagKey string, field reflect.StructField) map[string]string {
tag := field.Tag.Get(tagKey) tag := field.Tag.Get(tagKey)
if tag == "" { if tag == "" {

View File

@@ -29,13 +29,6 @@ func newLibrary(sdkConfig sdkConfiguration) *Library {
// GetFileHash - Get Hash Value // GetFileHash - Get Hash Value
// This resource returns hash values for local files // This resource returns hash values for local files
func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, opts ...operations.Option) (*operations.GetFileHashResponse, error) { func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64, opts ...operations.Option) (*operations.GetFileHashResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getFileHash",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetFileHashRequest{ request := operations.GetFileHashRequest{
URL: url_, URL: url_,
Type: type_, Type: type_,
@@ -64,6 +57,14 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getFileHash",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -262,13 +263,6 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64,
// GetRecentlyAddedLibrary - Get Recently Added // GetRecentlyAddedLibrary - Get Recently Added
// This endpoint will return the recently added content. // This endpoint will return the recently added content.
func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operations.GetRecentlyAddedLibraryRequest, opts ...operations.Option) (*operations.GetRecentlyAddedLibraryResponse, error) { func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operations.GetRecentlyAddedLibraryRequest, opts ...operations.Option) (*operations.GetRecentlyAddedLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-recently-added-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -292,6 +286,14 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-recently-added-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -515,13 +517,6 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation
// Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. // Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts.
// This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). // This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option) (*operations.GetAllLibrariesResponse, error) { func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option) (*operations.GetAllLibrariesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-all-libraries",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -545,6 +540,14 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-all-libraries",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -797,13 +800,6 @@ func (s *Library) GetAllLibraries(ctx context.Context, opts ...operations.Option
// //
// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. // > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, includeDetails *operations.IncludeDetails, opts ...operations.Option) (*operations.GetLibraryDetailsResponse, error) { func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, includeDetails *operations.IncludeDetails, opts ...operations.Option) (*operations.GetLibraryDetailsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-library-details",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetLibraryDetailsRequest{ request := operations.GetLibraryDetailsRequest{
IncludeDetails: includeDetails, IncludeDetails: includeDetails,
SectionKey: sectionKey, SectionKey: sectionKey,
@@ -832,6 +828,14 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-library-details",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1050,13 +1054,6 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include
// DeleteLibrary - Delete Library Section // DeleteLibrary - Delete Library Section
// Delete a library using a specific section id // Delete a library using a specific section id
func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...operations.Option) (*operations.DeleteLibraryResponse, error) { func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...operations.Option) (*operations.DeleteLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "deleteLibrary",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.DeleteLibraryRequest{ request := operations.DeleteLibraryRequest{
SectionKey: sectionKey, SectionKey: sectionKey,
} }
@@ -1084,6 +1081,14 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "deleteLibrary",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1298,13 +1303,6 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope
// - `folder`: Items categorized by folder. // - `folder`: Items categorized by folder.
// - `albums`: Items categorized by album. // - `albums`: Items categorized by album.
func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLibraryItemsRequest, opts ...operations.Option) (*operations.GetLibraryItemsResponse, error) { func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLibraryItemsRequest, opts ...operations.Option) (*operations.GetLibraryItemsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-library-items",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1328,6 +1326,14 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-library-items",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1546,13 +1552,6 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
// GetAllMediaLibrary - Get all media of library // GetAllMediaLibrary - Get all media of library
// Retrieves a list of all general media data for this library. // Retrieves a list of all general media data for this library.
func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.GetAllMediaLibraryRequest, opts ...operations.Option) (*operations.GetAllMediaLibraryResponse, error) { func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.GetAllMediaLibraryRequest, opts ...operations.Option) (*operations.GetAllMediaLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-all-media-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1576,6 +1575,14 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-all-media-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1796,13 +1803,6 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get
// GetRefreshLibraryMetadata - Refresh Metadata Of The Library // GetRefreshLibraryMetadata - Refresh Metadata Of The Library
// This endpoint Refreshes all the Metadata of the library. // This endpoint Refreshes all the Metadata of the library.
func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, force *operations.Force, opts ...operations.Option) (*operations.GetRefreshLibraryMetadataResponse, error) { func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int, force *operations.Force, opts ...operations.Option) (*operations.GetRefreshLibraryMetadataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-refresh-library-metadata",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetRefreshLibraryMetadataRequest{ request := operations.GetRefreshLibraryMetadataRequest{
Force: force, Force: force,
SectionKey: sectionKey, SectionKey: sectionKey,
@@ -1831,6 +1831,14 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-refresh-library-metadata",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -2046,13 +2054,6 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int,
// //
// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. // > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ operations.GetSearchLibraryQueryParamType, opts ...operations.Option) (*operations.GetSearchLibraryResponse, error) { func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ operations.GetSearchLibraryQueryParamType, opts ...operations.Option) (*operations.GetSearchLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-search-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSearchLibraryRequest{ request := operations.GetSearchLibraryRequest{
SectionKey: sectionKey, SectionKey: sectionKey,
Type: type_, Type: type_,
@@ -2081,6 +2082,14 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-search-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -2299,13 +2308,6 @@ func (s *Library) GetSearchLibrary(ctx context.Context, sectionKey int, type_ op
// GetGenresLibrary - Get Genres of library media // GetGenresLibrary - Get Genres of library media
// Retrieves a list of all the genres that are found for the media in this library. // Retrieves a list of all the genres that are found for the media in this library.
func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ operations.GetGenresLibraryQueryParamType, opts ...operations.Option) (*operations.GetGenresLibraryResponse, error) { func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ operations.GetGenresLibraryQueryParamType, opts ...operations.Option) (*operations.GetGenresLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-genres-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetGenresLibraryRequest{ request := operations.GetGenresLibraryRequest{
SectionKey: sectionKey, SectionKey: sectionKey,
Type: type_, Type: type_,
@@ -2334,6 +2336,14 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-genres-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -2554,13 +2564,6 @@ func (s *Library) GetGenresLibrary(ctx context.Context, sectionKey int, type_ op
// GetCountriesLibrary - Get Countries of library media // GetCountriesLibrary - Get Countries of library media
// Retrieves a list of all the countries that are found for the media in this library. // Retrieves a list of all the countries that are found for the media in this library.
func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ operations.GetCountriesLibraryQueryParamType, opts ...operations.Option) (*operations.GetCountriesLibraryResponse, error) { func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_ operations.GetCountriesLibraryQueryParamType, opts ...operations.Option) (*operations.GetCountriesLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-countries-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetCountriesLibraryRequest{ request := operations.GetCountriesLibraryRequest{
SectionKey: sectionKey, SectionKey: sectionKey,
Type: type_, Type: type_,
@@ -2589,6 +2592,14 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-countries-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -2809,13 +2820,6 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_
// GetActorsLibrary - Get Actors of library media // GetActorsLibrary - Get Actors of library media
// Retrieves a list of all the actors that are found for the media in this library. // Retrieves a list of all the actors that are found for the media in this library.
func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ operations.GetActorsLibraryQueryParamType, opts ...operations.Option) (*operations.GetActorsLibraryResponse, error) { func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ operations.GetActorsLibraryQueryParamType, opts ...operations.Option) (*operations.GetActorsLibraryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-actors-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetActorsLibraryRequest{ request := operations.GetActorsLibraryRequest{
SectionKey: sectionKey, SectionKey: sectionKey,
Type: type_, Type: type_,
@@ -2844,6 +2848,14 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-actors-library",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -3064,13 +3076,6 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op
// GetSearchAllLibraries - Search All Libraries // GetSearchAllLibraries - Search All Libraries
// Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type. // Search the provided query across all library sections, or a single section, and return matches as hubs, split up by type.
func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.GetSearchAllLibrariesRequest, opts ...operations.Option) (*operations.GetSearchAllLibrariesResponse, error) { func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.GetSearchAllLibrariesRequest, opts ...operations.Option) (*operations.GetSearchAllLibrariesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-search-all-libraries",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -3094,6 +3099,14 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-search-all-libraries",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -3314,13 +3327,6 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.
// GetMediaMetaData - Get Media Metadata // GetMediaMetaData - Get Media Metadata
// This endpoint will return all the (meta)data of a library item specified with by the ratingKey. // This endpoint will return all the (meta)data of a library item specified with by the ratingKey.
func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMediaMetaDataRequest, opts ...operations.Option) (*operations.GetMediaMetaDataResponse, error) { func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMediaMetaDataRequest, opts ...operations.Option) (*operations.GetMediaMetaDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-media-meta-data",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -3344,6 +3350,14 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-media-meta-data",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -3564,13 +3578,6 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe
// GetMetadataChildren - Get Items Children // GetMetadataChildren - Get Items Children
// This endpoint will return the children of of a library item specified with the ratingKey. // This endpoint will return the children of of a library item specified with the ratingKey.
func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, includeElements *string, opts ...operations.Option) (*operations.GetMetadataChildrenResponse, error) { func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, includeElements *string, opts ...operations.Option) (*operations.GetMetadataChildrenResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getMetadataChildren",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetMetadataChildrenRequest{ request := operations.GetMetadataChildrenRequest{
RatingKey: ratingKey, RatingKey: ratingKey,
IncludeElements: includeElements, IncludeElements: includeElements,
@@ -3599,6 +3606,14 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getMetadataChildren",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -3817,13 +3832,6 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in
// GetTopWatchedContent - Get Top Watched Content // GetTopWatchedContent - Get Top Watched Content
// This endpoint will return the top watched content from libraries of a certain type // This endpoint will return the top watched content from libraries of a certain type
func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.GetTopWatchedContentQueryParamType, includeGuids *int64, opts ...operations.Option) (*operations.GetTopWatchedContentResponse, error) { func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.GetTopWatchedContentQueryParamType, includeGuids *int64, opts ...operations.Option) (*operations.GetTopWatchedContentResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTopWatchedContent",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetTopWatchedContentRequest{ request := operations.GetTopWatchedContentRequest{
IncludeGuids: includeGuids, IncludeGuids: includeGuids,
Type: type_, Type: type_,
@@ -3852,6 +3860,14 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTopWatchedContent",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -4070,13 +4086,6 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get
// GetOnDeck - Get On Deck // GetOnDeck - Get On Deck
// This endpoint will return the on deck content. // This endpoint will return the on deck content.
func (s *Library) GetOnDeck(ctx context.Context, opts ...operations.Option) (*operations.GetOnDeckResponse, error) { func (s *Library) GetOnDeck(ctx context.Context, opts ...operations.Option) (*operations.GetOnDeckResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getOnDeck",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -4100,6 +4109,14 @@ func (s *Library) GetOnDeck(ctx context.Context, opts ...operations.Option) (*op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getOnDeck",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

44
log.go
View File

@@ -29,13 +29,6 @@ func newLog(sdkConfig sdkConfiguration) *Log {
// LogLine - Logging a single line message. // LogLine - Logging a single line message.
// This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. // This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
func (s *Log) LogLine(ctx context.Context, level operations.Level, message string, source string, opts ...operations.Option) (*operations.LogLineResponse, error) { func (s *Log) LogLine(ctx context.Context, level operations.Level, message string, source string, opts ...operations.Option) (*operations.LogLineResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "logLine",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.LogLineRequest{ request := operations.LogLineRequest{
Level: level, Level: level,
Message: message, Message: message,
@@ -65,6 +58,14 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "logLine",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -283,13 +284,6 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin
// //
// Ensure each parameter is properly URL-encoded to avoid interpretation issues. // Ensure each parameter is properly URL-encoded to avoid interpretation issues.
func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operations.Option) (*operations.LogMultiLineResponse, error) { func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operations.Option) (*operations.LogMultiLineResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "logMultiLine",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -313,6 +307,13 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "logMultiLine",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "string", `request:"mediaType=text/plain"`) bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "string", `request:"mediaType=text/plain"`)
if err != nil { if err != nil {
return nil, err return nil, err
@@ -515,13 +516,6 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio
// EnablePaperTrail - Enabling Papertrail // EnablePaperTrail - Enabling Papertrail
// This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. // This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time.
func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) (*operations.EnablePaperTrailResponse, error) { func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) (*operations.EnablePaperTrailResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "enablePaperTrail",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -545,6 +539,14 @@ func (s *Log) EnablePaperTrail(ctx context.Context, opts ...operations.Option) (
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "enablePaperTrail",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -29,13 +29,6 @@ func newMedia(sdkConfig sdkConfiguration) *Media {
// MarkPlayed - Mark Media Played // MarkPlayed - Mark Media Played
// This will mark the provided media key as Played. // This will mark the provided media key as Played.
func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations.Option) (*operations.MarkPlayedResponse, error) { func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations.Option) (*operations.MarkPlayedResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "markPlayed",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.MarkPlayedRequest{ request := operations.MarkPlayedRequest{
Key: key, Key: key,
} }
@@ -63,6 +56,14 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations.
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "markPlayed",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -261,13 +262,6 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations.
// MarkUnplayed - Mark Media Unplayed // MarkUnplayed - Mark Media Unplayed
// This will mark the provided media key as Unplayed. // This will mark the provided media key as Unplayed.
func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operations.Option) (*operations.MarkUnplayedResponse, error) { func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operations.Option) (*operations.MarkUnplayedResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "markUnplayed",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.MarkUnplayedRequest{ request := operations.MarkUnplayedRequest{
Key: key, Key: key,
} }
@@ -295,6 +289,14 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "markUnplayed",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -493,13 +495,6 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation
// UpdatePlayProgress - Update Media Play Progress // UpdatePlayProgress - Update Media Play Progress
// This API command can be used to update the play progress of a media item. // This API command can be used to update the play progress of a media item.
func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64, state string, opts ...operations.Option) (*operations.UpdatePlayProgressResponse, error) { func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64, state string, opts ...operations.Option) (*operations.UpdatePlayProgressResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "updatePlayProgress",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.UpdatePlayProgressRequest{ request := operations.UpdatePlayProgressRequest{
Key: key, Key: key,
Time: time, Time: time,
@@ -529,6 +524,14 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "updatePlayProgress",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -727,13 +730,6 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64
// GetBannerImage - Get Banner Image // GetBannerImage - Get Banner Image
// Gets the banner image of the media item // Gets the banner image of the media item
func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBannerImageRequest, opts ...operations.Option) (*operations.GetBannerImageResponse, error) { func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBannerImageRequest, opts ...operations.Option) (*operations.GetBannerImageResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-banner-image",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -757,6 +753,14 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-banner-image",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -971,13 +975,6 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner
// GetThumbImage - Get Thumb Image // GetThumbImage - Get Thumb Image
// Gets the thumbnail image of the media item // Gets the thumbnail image of the media item
func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbImageRequest, opts ...operations.Option) (*operations.GetThumbImageResponse, error) { func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbImageRequest, opts ...operations.Option) (*operations.GetThumbImageResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-thumb-image",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1001,6 +998,14 @@ func (s *Media) GetThumbImage(ctx context.Context, request operations.GetThumbIm
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-thumb-image",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -562,7 +562,7 @@ type GetTokenDetailsUserPlexAccount struct {
Subscription Subscription `json:"subscription"` Subscription Subscription `json:"subscription"`
// Description of the Plex Pass subscription // Description of the Plex Pass subscription
SubscriptionDescription *string `json:"subscriptionDescription"` SubscriptionDescription *string `json:"subscriptionDescription"`
Subscriptions []GetTokenDetailsSubscription `json:"subscriptions"` Subscriptions []GetTokenDetailsSubscription `json:"subscriptions,omitempty"`
// URL of the account thumbnail // URL of the account thumbnail
Thumb string `json:"thumb"` Thumb string `json:"thumb"`
// The title of the account (username or friendly name) // The title of the account (username or friendly name)
@@ -827,7 +827,7 @@ func (o *GetTokenDetailsUserPlexAccount) GetSubscriptionDescription() *string {
func (o *GetTokenDetailsUserPlexAccount) GetSubscriptions() []GetTokenDetailsSubscription { func (o *GetTokenDetailsUserPlexAccount) GetSubscriptions() []GetTokenDetailsSubscription {
if o == nil { if o == nil {
return []GetTokenDetailsSubscription{} return nil
} }
return o.Subscriptions return o.Subscriptions
} }

View File

@@ -848,7 +848,7 @@ type PostUsersSignInDataUserPlexAccount struct {
Subscription PostUsersSignInDataSubscription `json:"subscription"` Subscription PostUsersSignInDataSubscription `json:"subscription"`
// Description of the Plex Pass subscription // Description of the Plex Pass subscription
SubscriptionDescription *string `json:"subscriptionDescription"` SubscriptionDescription *string `json:"subscriptionDescription"`
Subscriptions []PostUsersSignInDataAuthenticationSubscription `json:"subscriptions"` Subscriptions []PostUsersSignInDataAuthenticationSubscription `json:"subscriptions,omitempty"`
// URL of the account thumbnail // URL of the account thumbnail
Thumb string `json:"thumb"` Thumb string `json:"thumb"`
// The title of the account (username or friendly name) // The title of the account (username or friendly name)
@@ -1115,7 +1115,7 @@ func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptionDescription() *strin
func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptions() []PostUsersSignInDataAuthenticationSubscription { func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptions() []PostUsersSignInDataAuthenticationSubscription {
if o == nil { if o == nil {
return []PostUsersSignInDataAuthenticationSubscription{} return nil
} }
return o.Subscriptions return o.Subscriptions
} }

View File

@@ -34,13 +34,6 @@ func newPlaylists(sdkConfig sdkConfiguration) *Playlists {
// - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). // - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
// - `playQueueID` - To create a playlist from an existing play queue. // - `playQueueID` - To create a playlist from an existing play queue.
func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.CreatePlaylistRequest, opts ...operations.Option) (*operations.CreatePlaylistResponse, error) { func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.CreatePlaylistRequest, opts ...operations.Option) (*operations.CreatePlaylistResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "createPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -64,6 +57,14 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "createPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -282,13 +283,6 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
// GetPlaylists - Get All Playlists // GetPlaylists - Get All Playlists
// Get All Playlists given the specified filters. // Get All Playlists given the specified filters.
func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.PlaylistType, smart *operations.QueryParamSmart, opts ...operations.Option) (*operations.GetPlaylistsResponse, error) { func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.PlaylistType, smart *operations.QueryParamSmart, opts ...operations.Option) (*operations.GetPlaylistsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getPlaylists",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetPlaylistsRequest{ request := operations.GetPlaylistsRequest{
PlaylistType: playlistType, PlaylistType: playlistType,
Smart: smart, Smart: smart,
@@ -317,6 +311,14 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getPlaylists",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -536,13 +538,6 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P
// Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: // Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
// Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. // Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.GetPlaylistResponse, error) { func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.GetPlaylistResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetPlaylistRequest{ request := operations.GetPlaylistRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
} }
@@ -570,6 +565,14 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts ..
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -784,13 +787,6 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts ..
// DeletePlaylist - Deletes a Playlist // DeletePlaylist - Deletes a Playlist
// This endpoint will delete a playlist // This endpoint will delete a playlist
func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.DeletePlaylistResponse, error) { func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.DeletePlaylistResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "deletePlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.DeletePlaylistRequest{ request := operations.DeletePlaylistRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
} }
@@ -818,6 +814,14 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "deletePlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1012,13 +1016,6 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts
// UpdatePlaylist - Update a Playlist // UpdatePlaylist - Update a Playlist
// From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` // From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}`
func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, title *string, summary *string, opts ...operations.Option) (*operations.UpdatePlaylistResponse, error) { func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, title *string, summary *string, opts ...operations.Option) (*operations.UpdatePlaylistResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "updatePlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.UpdatePlaylistRequest{ request := operations.UpdatePlaylistRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
Title: title, Title: title,
@@ -1048,6 +1045,14 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "updatePlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1249,13 +1254,6 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl
// For example, you could use this to display a list of recently added albums vis a smart playlist. // For example, you could use this to display a list of recently added albums vis a smart playlist.
// Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. // Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items.
func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, type_ operations.GetPlaylistContentsQueryParamType, opts ...operations.Option) (*operations.GetPlaylistContentsResponse, error) { func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64, type_ operations.GetPlaylistContentsQueryParamType, opts ...operations.Option) (*operations.GetPlaylistContentsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetPlaylistContentsRequest{ request := operations.GetPlaylistContentsRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
Type: type_, Type: type_,
@@ -1284,6 +1282,14 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1502,13 +1508,6 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64,
// ClearPlaylistContents - Delete Playlist Contents // ClearPlaylistContents - Delete Playlist Contents
// Clears a playlist, only works with dumb playlists. Returns the playlist. // Clears a playlist, only works with dumb playlists. Returns the playlist.
func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.ClearPlaylistContentsResponse, error) { func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float64, opts ...operations.Option) (*operations.ClearPlaylistContentsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "clearPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.ClearPlaylistContentsRequest{ request := operations.ClearPlaylistContentsRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
} }
@@ -1536,6 +1535,14 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "clearPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1731,13 +1738,6 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6
// Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. // Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist.
// With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. // With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist.
func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, uri string, playQueueID *float64, opts ...operations.Option) (*operations.AddPlaylistContentsResponse, error) { func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64, uri string, playQueueID *float64, opts ...operations.Option) (*operations.AddPlaylistContentsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "addPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.AddPlaylistContentsRequest{ request := operations.AddPlaylistContentsRequest{
PlaylistID: playlistID, PlaylistID: playlistID,
URI: uri, URI: uri,
@@ -1767,6 +1767,14 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "addPlaylistContents",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1985,13 +1993,6 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64,
// UploadPlaylist - Upload Playlist // UploadPlaylist - Upload Playlist
// Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. // Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force operations.QueryParamForce, sectionID int64, opts ...operations.Option) (*operations.UploadPlaylistResponse, error) { func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force operations.QueryParamForce, sectionID int64, opts ...operations.Option) (*operations.UploadPlaylistResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "uploadPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.UploadPlaylistRequest{ request := operations.UploadPlaylistRequest{
Path: path, Path: path,
Force: force, Force: force,
@@ -2021,6 +2022,14 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "uploadPlaylist",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

105
plex.go
View File

@@ -29,13 +29,6 @@ func newPlex(sdkConfig sdkConfiguration) *Plex {
// GetCompanionsData - Get Companions Data // GetCompanionsData - Get Companions Data
// Get Companions Data // Get Companions Data
func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) (*operations.GetCompanionsDataResponse, error) { func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option) (*operations.GetCompanionsDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getCompanionsData",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -58,6 +51,14 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option)
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getCompanionsData",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -272,13 +273,6 @@ func (s *Plex) GetCompanionsData(ctx context.Context, opts ...operations.Option)
// GetUserFriends - Get list of friends of the user logged in // GetUserFriends - Get list of friends of the user logged in
// Get friends of provided auth token. // Get friends of provided auth token.
func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (*operations.GetUserFriendsResponse, error) { func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (*operations.GetUserFriendsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getUserFriends",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -301,6 +295,14 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (*
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getUserFriends",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -515,13 +517,6 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (*
// GetGeoData - Get Geo Data // GetGeoData - Get Geo Data
// Returns the geolocation and locale data of the caller // Returns the geolocation and locale data of the caller
func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*operations.GetGeoDataResponse, error) { func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*operations.GetGeoDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getGeoData",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -544,6 +539,14 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getGeoData",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -754,13 +757,6 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper
// GetHomeData - Get Plex Home Data // GetHomeData - Get Plex Home Data
// Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. // Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*operations.GetHomeDataResponse, error) { func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*operations.GetHomeDataResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getHomeData",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -784,6 +780,14 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getHomeData",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -998,13 +1002,6 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope
// GetServerResources - Get Server Resources // GetServerResources - Get Server Resources
// Get Plex server access tokens and server connections // Get Plex server access tokens and server connections
func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeHTTPS *operations.IncludeHTTPS, includeRelay *operations.IncludeRelay, includeIPv6 *operations.IncludeIPv6, opts ...operations.Option) (*operations.GetServerResourcesResponse, error) { func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeHTTPS *operations.IncludeHTTPS, includeRelay *operations.IncludeRelay, includeIPv6 *operations.IncludeIPv6, opts ...operations.Option) (*operations.GetServerResourcesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-server-resources",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetServerResourcesRequest{ request := operations.GetServerResourcesRequest{
IncludeHTTPS: includeHTTPS, IncludeHTTPS: includeHTTPS,
IncludeRelay: includeRelay, IncludeRelay: includeRelay,
@@ -1034,6 +1031,14 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-server-resources",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1254,13 +1259,6 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH
// GetPin - Get a Pin // GetPin - Get a Pin
// Retrieve a Pin ID from Plex.tv to use for authentication flows // Retrieve a Pin ID from Plex.tv to use for authentication flows
func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opts ...operations.Option) (*operations.GetPinResponse, error) { func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opts ...operations.Option) (*operations.GetPinResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getPin",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1283,6 +1281,14 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getPin",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1477,13 +1483,6 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
// GetTokenByPinID - Get Access Token by PinId // GetTokenByPinID - Get Access Token by PinId
// Retrieve an Access Token from Plex.tv after the Pin has been authenticated // Retrieve an Access Token from Plex.tv after the Pin has been authenticated
func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenByPinIDRequest, 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",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1506,6 +1505,14 @@ func (s *Plex) GetTokenByPinID(ctx context.Context, request operations.GetTokenB
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTokenByPinId",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -299,9 +299,9 @@ func New(opts ...SDKOption) *PlexAPI {
sdkConfiguration: sdkConfiguration{ sdkConfiguration: sdkConfiguration{
Language: "go", Language: "go",
OpenAPIDocVersion: "0.0.3", OpenAPIDocVersion: "0.0.3",
SDKVersion: "0.19.0", SDKVersion: "0.19.1",
GenVersion: "2.506.0", GenVersion: "2.545.4",
UserAgent: "speakeasy-sdk/go 0.19.0 2.506.0 0.0.3 github.com/LukeHagar/plexgo", UserAgent: "speakeasy-sdk/go 0.19.1 2.545.4 0.0.3 github.com/LukeHagar/plexgo",
ServerDefaults: []map[string]string{ ServerDefaults: []map[string]string{
{ {
"protocol": "https", "protocol": "https",

View File

@@ -41,13 +41,6 @@ func newSearch(sdkConfig sdkConfiguration) *Search {
// //
// This request is intended to be very fast, and called as the user types. // This request is intended to be very fast, and called as the user types.
func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *float64, limit *float64, opts ...operations.Option) (*operations.PerformSearchResponse, error) { func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *float64, limit *float64, opts ...operations.Option) (*operations.PerformSearchResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "performSearch",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.PerformSearchRequest{ request := operations.PerformSearchRequest{
Query: query, Query: query,
SectionID: sectionID, SectionID: sectionID,
@@ -77,6 +70,14 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "performSearch",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -278,13 +279,6 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo
// Whenever possible, clients should limit the search to the appropriate type. // Whenever possible, clients should limit the search to the appropriate type.
// Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. // Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.
func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID *float64, limit *float64, opts ...operations.Option) (*operations.PerformVoiceSearchResponse, error) { func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID *float64, limit *float64, opts ...operations.Option) (*operations.PerformVoiceSearchResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "performVoiceSearch",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.PerformVoiceSearchRequest{ request := operations.PerformVoiceSearchRequest{
Query: query, Query: query,
SectionID: sectionID, SectionID: sectionID,
@@ -314,6 +308,14 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "performVoiceSearch",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -512,13 +514,6 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID
// GetSearchResults - Get Search Results // GetSearchResults - Get Search Results
// This will search the database for the string provided. // This will search the database for the string provided.
func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...operations.Option) (*operations.GetSearchResultsResponse, error) { func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...operations.Option) (*operations.GetSearchResultsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSearchResults",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSearchResultsRequest{ request := operations.GetSearchResultsRequest{
Query: query, Query: query,
} }
@@ -546,6 +541,14 @@ func (s *Search) GetSearchResults(ctx context.Context, query string, opts ...ope
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getSearchResults",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

135
server.go
View File

@@ -29,13 +29,6 @@ func newServer(sdkConfig sdkConfiguration) *Server {
// GetServerCapabilities - Get Server Capabilities // GetServerCapabilities - Get Server Capabilities
// Get Server Capabilities // Get Server Capabilities
func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.Option) (*operations.GetServerCapabilitiesResponse, error) { func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.Option) (*operations.GetServerCapabilitiesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerCapabilities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -59,6 +52,14 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getServerCapabilities",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -273,13 +274,6 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O
// GetServerPreferences - Get Server Preferences // GetServerPreferences - Get Server Preferences
// Get Server Preferences // Get Server Preferences
func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Option) (*operations.GetServerPreferencesResponse, error) { func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Option) (*operations.GetServerPreferencesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerPreferences",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -303,6 +297,14 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getServerPreferences",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -517,13 +519,6 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op
// GetAvailableClients - Get Available Clients // GetAvailableClients - Get Available Clients
// Get Available Clients // Get Available Clients
func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Option) (*operations.GetAvailableClientsResponse, error) { func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Option) (*operations.GetAvailableClientsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getAvailableClients",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -547,6 +542,14 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getAvailableClients",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -761,13 +764,6 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt
// GetDevices - Get Devices // GetDevices - Get Devices
// Get Devices // Get Devices
func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*operations.GetDevicesResponse, error) { func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*operations.GetDevicesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getDevices",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -791,6 +787,14 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getDevices",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1005,13 +1009,6 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op
// GetServerIdentity - Get Server Identity // GetServerIdentity - Get Server Identity
// This request is useful to determine if the server is online or offline // This request is useful to determine if the server is online or offline
func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Option) (*operations.GetServerIdentityResponse, error) { func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Option) (*operations.GetServerIdentityResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-server-identity",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1035,6 +1032,14 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-server-identity",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1223,13 +1228,6 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio
// GetMyPlexAccount - Get MyPlex Account // GetMyPlexAccount - Get MyPlex Account
// Returns MyPlex Account Information // Returns MyPlex Account Information
func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option) (*operations.GetMyPlexAccountResponse, error) { func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option) (*operations.GetMyPlexAccountResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getMyPlexAccount",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1253,6 +1251,14 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getMyPlexAccount",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1467,13 +1473,6 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option
// GetResizedPhoto - Get a Resized Photo // GetResizedPhoto - Get a Resized Photo
// Plex's Photo transcoder is used throughout the service to serve images at specified sizes. // Plex's Photo transcoder is used throughout the service to serve images at specified sizes.
func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResizedPhotoRequest, opts ...operations.Option) (*operations.GetResizedPhotoResponse, error) { func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResizedPhotoRequest, opts ...operations.Option) (*operations.GetResizedPhotoResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getResizedPhoto",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1497,6 +1496,14 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getResizedPhoto",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1695,13 +1702,6 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
// GetMediaProviders - Get Media Providers // GetMediaProviders - Get Media Providers
// Retrieves media providers and their features from the Plex server. // Retrieves media providers and their features from the Plex server.
func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts ...operations.Option) (*operations.GetMediaProvidersResponse, error) { func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts ...operations.Option) (*operations.GetMediaProvidersResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-media-providers",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetMediaProvidersRequest{ request := operations.GetMediaProvidersRequest{
XPlexToken: xPlexToken, XPlexToken: xPlexToken,
} }
@@ -1729,6 +1729,14 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-media-providers",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -1945,13 +1953,6 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts
// GetServerList - Get Server List // GetServerList - Get Server List
// Get Server List // Get Server List
func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) (*operations.GetServerListResponse, error) { func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) (*operations.GetServerListResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getServerList",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -1975,6 +1976,14 @@ func (s *Server) GetServerList(ctx context.Context, opts ...operations.Option) (
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getServerList",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -29,13 +29,6 @@ func newSessions(sdkConfig sdkConfiguration) *Sessions {
// GetSessions - Get Active Sessions // GetSessions - Get Active Sessions
// This will retrieve the "Now Playing" Information of the PMS. // This will retrieve the "Now Playing" Information of the PMS.
func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) (*operations.GetSessionsResponse, error) { func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) (*operations.GetSessionsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSessions",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -59,6 +52,14 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) (
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getSessions",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -273,13 +274,6 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) (
// GetSessionHistory - Get Session History // GetSessionHistory - Get Session History
// This will Retrieve a listing of all history views. // This will Retrieve a listing of all history views.
func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountID *int64, filter *operations.QueryParamFilter, librarySectionID *int64, opts ...operations.Option) (*operations.GetSessionHistoryResponse, error) { func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountID *int64, filter *operations.QueryParamFilter, librarySectionID *int64, opts ...operations.Option) (*operations.GetSessionHistoryResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getSessionHistory",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetSessionHistoryRequest{ request := operations.GetSessionHistoryRequest{
Sort: sort, Sort: sort,
AccountID: accountID, AccountID: accountID,
@@ -310,6 +304,14 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getSessionHistory",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -528,13 +530,6 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI
// GetTranscodeSessions - Get Transcode Sessions // GetTranscodeSessions - Get Transcode Sessions
// Get Transcode Sessions // Get Transcode Sessions
func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.Option) (*operations.GetTranscodeSessionsResponse, error) { func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.Option) (*operations.GetTranscodeSessionsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTranscodeSessions",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -558,6 +553,14 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTranscodeSessions",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -772,13 +775,6 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.
// StopTranscodeSession - Stop a Transcode Session // StopTranscodeSession - Stop a Transcode Session
// Stop a Transcode Session // Stop a Transcode Session
func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, opts ...operations.Option) (*operations.StopTranscodeSessionResponse, error) { func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string, opts ...operations.Option) (*operations.StopTranscodeSessionResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "stopTranscodeSession",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.StopTranscodeSessionRequest{ request := operations.StopTranscodeSessionRequest{
SessionKey: sessionKey, SessionKey: sessionKey,
} }
@@ -806,6 +802,14 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "stopTranscodeSession",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -29,13 +29,6 @@ func newStatistics(sdkConfig sdkConfiguration) *Statistics {
// GetStatistics - Get Media Statistics // GetStatistics - Get Media Statistics
// This will return the media statistics for the server // This will return the media statistics for the server
func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetStatisticsResponse, error) { func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetStatisticsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetStatisticsRequest{ request := operations.GetStatisticsRequest{
Timespan: timespan, Timespan: timespan,
} }
@@ -63,6 +56,14 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts ..
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -281,13 +282,6 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts ..
// GetResourcesStatistics - Get Resources Statistics // GetResourcesStatistics - Get Resources Statistics
// This will return the resources for the server // This will return the resources for the server
func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetResourcesStatisticsResponse, error) { func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetResourcesStatisticsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getResourcesStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetResourcesStatisticsRequest{ request := operations.GetResourcesStatisticsRequest{
Timespan: timespan, Timespan: timespan,
} }
@@ -315,6 +309,14 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getResourcesStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -533,13 +535,6 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64
// GetBandwidthStatistics - Get Bandwidth Statistics // GetBandwidthStatistics - Get Bandwidth Statistics
// This will return the bandwidth statistics for the server // This will return the bandwidth statistics for the server
func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetBandwidthStatisticsResponse, error) { func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64, opts ...operations.Option) (*operations.GetBandwidthStatisticsResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getBandwidthStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.GetBandwidthStatisticsRequest{ request := operations.GetBandwidthStatisticsRequest{
Timespan: timespan, Timespan: timespan,
} }
@@ -567,6 +562,14 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getBandwidthStatistics",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -30,13 +30,6 @@ func newUpdater(sdkConfig sdkConfiguration) *Updater {
// GetUpdateStatus - Querying status of updates // GetUpdateStatus - Querying status of updates
// Querying status of updates // Querying status of updates
func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option) (*operations.GetUpdateStatusResponse, error) { func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option) (*operations.GetUpdateStatusResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getUpdateStatus",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -60,6 +53,14 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getUpdateStatus",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -274,13 +275,6 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option
// CheckForUpdates - Checking for updates // CheckForUpdates - Checking for updates
// Checking for updates // Checking for updates
func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Download, opts ...operations.Option) (*operations.CheckForUpdatesResponse, error) { func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Download, opts ...operations.Option) (*operations.CheckForUpdatesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "checkForUpdates",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.CheckForUpdatesRequest{ request := operations.CheckForUpdatesRequest{
Download: download, Download: download,
} }
@@ -308,6 +302,14 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "checkForUpdates",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -506,13 +508,6 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down
// ApplyUpdates - Apply Updates // ApplyUpdates - Apply Updates
// Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed // Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed
func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, skip *operations.Skip, opts ...operations.Option) (*operations.ApplyUpdatesResponse, error) { func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight, skip *operations.Skip, opts ...operations.Option) (*operations.ApplyUpdatesResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "applyUpdates",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
request := operations.ApplyUpdatesRequest{ request := operations.ApplyUpdatesRequest{
Tonight: tonight, Tonight: tonight,
Skip: skip, Skip: skip,
@@ -541,6 +536,14 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight,
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "applyUpdates",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -28,13 +28,6 @@ func newUsers(sdkConfig sdkConfiguration) *Users {
// GetUsers - Get list of all connected users // GetUsers - Get list of all connected users
// Get list of all users that are friends and have library access with the provided Plex authentication token // Get list of all users that are friends and have library access with the provided Plex authentication token
func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest, opts ...operations.Option) (*operations.GetUsersResponse, error) { func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest, opts ...operations.Option) (*operations.GetUsersResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-users",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -57,6 +50,14 @@ func (s *Users) GetUsers(ctx context.Context, request operations.GetUsersRequest
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-users",
OAuth2Scopes: []string{},
SecuritySource: nil,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -29,13 +29,6 @@ func newVideo(sdkConfig sdkConfiguration) *Video {
// GetTimeline - Get the timeline for a media item // GetTimeline - Get the timeline for a media item
// Get the timeline for a media item // Get the timeline for a media item
func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineRequest, opts ...operations.Option) (*operations.GetTimelineResponse, error) { func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineRequest, opts ...operations.Option) (*operations.GetTimelineResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "getTimeline",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -59,6 +52,14 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "getTimeline",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout
@@ -257,13 +258,6 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
// StartUniversalTranscode - Start Universal Transcode // StartUniversalTranscode - Start Universal Transcode
// Begin a Universal Transcode Session // Begin a Universal Transcode Session
func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.StartUniversalTranscodeRequest, opts ...operations.Option) (*operations.StartUniversalTranscodeResponse, error) { func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.StartUniversalTranscodeRequest, opts ...operations.Option) (*operations.StartUniversalTranscodeResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "startUniversalTranscode",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -287,6 +281,14 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "startUniversalTranscode",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout

View File

@@ -28,13 +28,6 @@ func newWatchlist(sdkConfig sdkConfiguration) *Watchlist {
// GetWatchList - Get User Watchlist // GetWatchList - Get User Watchlist
// Get User Watchlist // Get User Watchlist
func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatchListRequest, opts ...operations.Option) (*operations.GetWatchListResponse, error) { func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatchListRequest, opts ...operations.Option) (*operations.GetWatchListResponse, error) {
hookCtx := hooks.HookContext{
Context: ctx,
OperationID: "get-watch-list",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
o := operations.Options{} o := operations.Options{}
supportedOptions := []string{ supportedOptions := []string{
operations.SupportedOptionRetries, operations.SupportedOptionRetries,
@@ -57,6 +50,14 @@ func (s *Watchlist) GetWatchList(ctx context.Context, request operations.GetWatc
return nil, fmt.Errorf("error generating URL: %w", err) return nil, fmt.Errorf("error generating URL: %w", err)
} }
hookCtx := hooks.HookContext{
BaseURL: baseURL,
Context: ctx,
OperationID: "get-watch-list",
OAuth2Scopes: []string{},
SecuritySource: s.sdkConfiguration.Security,
}
timeout := o.Timeout timeout := o.Timeout
if timeout == nil { if timeout == nil {
timeout = s.sdkConfiguration.Timeout timeout = s.sdkConfiguration.Timeout