mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.513.4
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -7,13 +7,15 @@ generation:
|
||||
useClassNamesForArrayFields: true
|
||||
fixes:
|
||||
nameResolutionDec2023: true
|
||||
nameResolutionFeb2025: false
|
||||
parameterOrderingFeb2024: true
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
securityFeb2025: false
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
go:
|
||||
version: 0.19.0
|
||||
version: 0.19.1
|
||||
additionalDependencies: {}
|
||||
allowUnknownFieldsInWeakUnions: false
|
||||
clientServerStatusCodesAsErrors: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.488.0
|
||||
speakeasyVersion: 1.513.4
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -9,19 +9,19 @@ sources:
|
||||
- main
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6
|
||||
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1739232555
|
||||
- speakeasy-sdk-regen-1741392494
|
||||
targets:
|
||||
plexgo:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:0efb9039972533bf1190dfc1ffb377429a8e486b6299442e732f662c1ffbeca6
|
||||
sourceBlobDigest: sha256:038d73166cc9db17f514d511cfe4365ea032f4ebcb247fa86b7aa1bba0e1ab46
|
||||
sourceRevisionDigest: sha256:bf7001af017ce5072c503bfbaf60793f94549163b517489dc53e4f7b685659c0
|
||||
sourceBlobDigest: sha256:ed2b29043c84f32d2efa92a126083fd9a81644a7ce9c6ac86d9aeb3493cbd6f8
|
||||
codeSamplesNamespace: code-samples-go-plexgo
|
||||
codeSamplesRevisionDigest: sha256:96b23ddcc80db35c9852b114146c3be99c47b4375338f8d605199a53c0498cc8
|
||||
codeSamplesRevisionDigest: sha256:01609ce90e3ede4fb9713410186aab8747cf7992930126be0a0e4af56761e5e0
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
43
README.md
43
README.md
@@ -397,13 +397,48 @@ func main() {
|
||||
### 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:
|
||||
* `WithProtocol(protocol ServerProtocol)`
|
||||
* `WithIP(ip string)`
|
||||
* `WithPort(port string)`
|
||||
|
||||
| Variable | Option | Supported Values | Default | Description |
|
||||
| ---------- | --------------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |
|
||||
| `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
|
||||
|
||||
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
|
||||
package main
|
||||
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -1052,4 +1052,14 @@ Based on:
|
||||
### Generated
|
||||
- [go v0.19.0] .
|
||||
### 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 - .
|
||||
@@ -35,13 +35,6 @@ func newActivities(sdkConfig sdkConfiguration) *Activities {
|
||||
// GetServerActivities - Get Server Activities
|
||||
// Get Server Activities
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -65,6 +58,14 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -279,13 +280,6 @@ func (s *Activities) GetServerActivities(ctx context.Context, opts ...operations
|
||||
// CancelServerActivities - Cancel Server Activities
|
||||
// Cancel Server Activities
|
||||
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{
|
||||
ActivityUUID: activityUUID,
|
||||
}
|
||||
@@ -313,6 +307,14 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
@@ -29,13 +29,6 @@ func newAuthentication(sdkConfig sdkConfiguration) *Authentication {
|
||||
// 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.
|
||||
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{
|
||||
Type: type_,
|
||||
Scope: scope,
|
||||
@@ -64,6 +57,14 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations
|
||||
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
|
||||
if timeout == nil {
|
||||
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.
|
||||
// Note: requires Plex Media Server >= 1.15.4.
|
||||
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{
|
||||
Source: source,
|
||||
}
|
||||
@@ -297,6 +291,14 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -495,13 +497,6 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou
|
||||
// GetTokenDetails - Get Token Details
|
||||
// Get the User data from the provided X-Plex-Token
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -524,6 +519,14 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -738,13 +741,6 @@ func (s *Authentication) GetTokenDetails(ctx context.Context, opts ...operations
|
||||
// PostUsersSignInData - Get User Sign In Data
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "post-users-sign-in-data",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -767,6 +763,13 @@ func (s *Authentication) PostUsersSignInData(ctx context.Context, request operat
|
||||
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"`)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
75
butler.go
75
butler.go
@@ -29,13 +29,6 @@ func newButler(sdkConfig sdkConfiguration) *Butler {
|
||||
// GetButlerTasks - Get Butler tasks
|
||||
// Returns a list of butler tasks
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getButlerTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "startAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "startAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -501,13 +503,6 @@ func (s *Butler) StartAllTasks(ctx context.Context, opts ...operations.Option) (
|
||||
// StopAllTasks - Stop all Butler tasks
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "stopAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "stopAllTasks",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "startTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.StartTaskRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "startTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "stopTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.StopTaskRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "stopTask",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
2235
codeSamples.yaml
2235
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ Logged in user details
|
||||
| `Services` | [][operations.Services](../../models/operations/services.md) | :heavy_check_mark: | N/A | |
|
||||
| `Subscription` | [operations.Subscription](../../models/operations/subscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | |
|
||||
| `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 |
|
||||
| `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 | |
|
||||
|
||||
@@ -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 | |
|
||||
| `Subscription` | [operations.PostUsersSignInDataSubscription](../../models/operations/postuserssignindatasubscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | |
|
||||
| `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 |
|
||||
| `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 | |
|
||||
|
||||
@@ -34,7 +34,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -85,7 +85,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -87,7 +87,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -139,7 +139,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -191,7 +191,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Authentication.PostUsersSignInData(ctx, operations.PostUsersSignInDataRequest{
|
||||
|
||||
@@ -31,7 +31,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -87,7 +87,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -139,7 +139,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -196,7 +196,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -250,7 +250,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -84,7 +84,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -139,7 +139,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -98,7 +98,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -174,7 +174,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -264,7 +264,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -317,7 +317,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -391,7 +391,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -449,7 +449,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -506,7 +506,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -578,7 +578,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -633,7 +633,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -688,7 +688,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -743,7 +743,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -798,7 +798,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -858,7 +858,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -926,7 +926,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -981,7 +981,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -1035,7 +1035,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -106,7 +106,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -161,7 +161,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -83,7 +83,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -136,7 +136,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -191,7 +191,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -251,7 +251,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -99,7 +99,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -154,7 +154,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -207,7 +207,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -260,7 +260,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -319,7 +319,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -373,7 +373,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -427,7 +427,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -483,7 +483,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -33,7 +33,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -84,7 +84,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -135,7 +135,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Plex.GetGeoData(ctx)
|
||||
@@ -184,7 +184,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -235,7 +235,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -291,7 +291,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Plex.GetPin(ctx, operations.GetPinRequest{
|
||||
@@ -347,7 +347,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Plex.GetTokenByPinID(ctx, operations.GetTokenByPinIDRequest{
|
||||
|
||||
@@ -41,7 +41,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -99,7 +99,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -153,7 +153,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -35,7 +35,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -86,7 +86,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -137,7 +137,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -188,7 +188,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -239,7 +239,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Server.GetServerIdentity(ctx)
|
||||
@@ -287,7 +287,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -340,7 +340,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -400,7 +400,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -452,7 +452,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -82,7 +82,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -137,7 +137,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -188,7 +188,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -81,7 +81,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -133,7 +133,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -82,7 +82,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -136,7 +136,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New()
|
||||
|
||||
res, err := s.Users.GetUsers(ctx, operations.GetUsersRequest{
|
||||
|
||||
@@ -29,7 +29,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
@@ -93,7 +93,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
@@ -28,7 +28,7 @@ import(
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
45
hubs.go
45
hubs.go
@@ -29,13 +29,6 @@ func newHubs(sdkConfig sdkConfiguration) *Hubs {
|
||||
// GetGlobalHubs - Get Global Hubs
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getGlobalHubs",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetGlobalHubsRequest{
|
||||
Count: count,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getGlobalHubs",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -282,13 +283,6 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
|
||||
// GetRecentlyAdded - Get Recently Added
|
||||
// This endpoint will return the recently added content.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-recently-added",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -490,13 +492,6 @@ func (s *Hubs) GetRecentlyAdded(ctx context.Context, request operations.GetRecen
|
||||
// GetLibraryHubs - Get 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getLibraryHubs",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetLibraryHubsRequest{
|
||||
SectionID: sectionID,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getLibraryHubs",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
@@ -24,6 +24,7 @@ type HTTPClient interface {
|
||||
}
|
||||
|
||||
type HookContext struct {
|
||||
BaseURL string
|
||||
Context context.Context
|
||||
OperationID string
|
||||
OAuth2Scopes []string
|
||||
|
||||
@@ -15,11 +15,15 @@ import (
|
||||
"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{}
|
||||
|
||||
if isNil(objType, objValue) {
|
||||
if defaultValue != nil {
|
||||
formValues.Add(paramName, *defaultValue)
|
||||
}
|
||||
|
||||
return formValues
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ func populateQueryParams(queryParams interface{}, globals interface{}, values ur
|
||||
continue
|
||||
}
|
||||
|
||||
defaultValue := parseDefaultTag(fieldType)
|
||||
|
||||
if globals != nil {
|
||||
var globalFound bool
|
||||
fieldType, valType, globalFound = populateFromGlobals(fieldType, valType, queryParamTagKey, globals)
|
||||
@@ -97,14 +99,14 @@ func populateQueryParams(queryParams interface{}, globals interface{}, values ur
|
||||
}
|
||||
}
|
||||
case "form":
|
||||
vals := populateFormParams(qpTag, fieldType.Type, valType, ",")
|
||||
vals := populateFormParams(qpTag, fieldType.Type, valType, ",", defaultValue)
|
||||
for k, v := range vals {
|
||||
for _, vv := range v {
|
||||
values.Add(k, vv)
|
||||
}
|
||||
}
|
||||
case "pipeDelimited":
|
||||
vals := populateFormParams(qpTag, fieldType.Type, valType, "|")
|
||||
vals := populateFormParams(qpTag, fieldType.Type, valType, "|", defaultValue)
|
||||
for k, v := range vals {
|
||||
for _, vv := range v {
|
||||
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 {
|
||||
return populateForm(tag.ParamName, tag.Explode, objType, objValue, delimiter, func(fieldType reflect.StructField) string {
|
||||
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, defaultValue, func(fieldType reflect.StructField) string {
|
||||
qpTag := parseQueryParamTag(fieldType)
|
||||
if qpTag == nil {
|
||||
return ""
|
||||
|
||||
@@ -292,7 +292,7 @@ func encodeFormData(fieldName string, w io.Writer, data interface{}) error {
|
||||
switch tag.Style {
|
||||
// TODO: support other styles
|
||||
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)
|
||||
if tag == nil {
|
||||
return ""
|
||||
|
||||
@@ -106,6 +106,16 @@ func parseConstTag(field reflect.StructField) *string {
|
||||
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 {
|
||||
tag := field.Tag.Get(tagKey)
|
||||
if tag == "" {
|
||||
|
||||
255
library.go
255
library.go
@@ -29,13 +29,6 @@ func newLibrary(sdkConfig sdkConfiguration) *Library {
|
||||
// GetFileHash - Get Hash Value
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getFileHash",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetFileHashRequest{
|
||||
URL: url_,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getFileHash",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -262,13 +263,6 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64,
|
||||
// GetRecentlyAddedLibrary - Get Recently Added
|
||||
// This endpoint will return the recently added content.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -292,6 +286,14 @@ func (s *Library) GetRecentlyAddedLibrary(ctx context.Context, request operation
|
||||
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
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-all-libraries",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-all-libraries",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
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{
|
||||
IncludeDetails: includeDetails,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-library-details",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1050,13 +1054,6 @@ func (s *Library) GetLibraryDetails(ctx context.Context, sectionKey int, include
|
||||
// DeleteLibrary - Delete Library Section
|
||||
// Delete a library using a specific section id
|
||||
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{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "deleteLibrary",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1298,13 +1303,6 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionKey int, opts ...ope
|
||||
// - `folder`: Items categorized by folder.
|
||||
// - `albums`: Items categorized by album.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-library-items",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1546,13 +1552,6 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
|
||||
// GetAllMediaLibrary - Get all media of 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-all-media-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-all-media-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1796,13 +1803,6 @@ func (s *Library) GetAllMediaLibrary(ctx context.Context, request operations.Get
|
||||
// GetRefreshLibraryMetadata - Refresh 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-refresh-library-metadata",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetRefreshLibraryMetadataRequest{
|
||||
Force: force,
|
||||
SectionKey: sectionKey,
|
||||
@@ -1831,6 +1831,14 @@ func (s *Library) GetRefreshLibraryMetadata(ctx context.Context, sectionKey int,
|
||||
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
|
||||
if timeout == nil {
|
||||
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.
|
||||
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{
|
||||
SectionKey: sectionKey,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-search-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-genres-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetGenresLibraryRequest{
|
||||
SectionKey: sectionKey,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-genres-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-countries-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetCountriesLibraryRequest{
|
||||
SectionKey: sectionKey,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-countries-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -2809,13 +2820,6 @@ func (s *Library) GetCountriesLibrary(ctx context.Context, sectionKey int, type_
|
||||
// GetActorsLibrary - Get Actors of library media
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-actors-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetActorsLibraryRequest{
|
||||
SectionKey: sectionKey,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-actors-library",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -3064,13 +3076,6 @@ func (s *Library) GetActorsLibrary(ctx context.Context, sectionKey int, type_ op
|
||||
// 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.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -3094,6 +3099,14 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -3314,13 +3327,6 @@ func (s *Library) GetSearchAllLibraries(ctx context.Context, request operations.
|
||||
// GetMediaMetaData - Get Media Metadata
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-media-meta-data",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-media-meta-data",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -3564,13 +3578,6 @@ func (s *Library) GetMediaMetaData(ctx context.Context, request operations.GetMe
|
||||
// GetMetadataChildren - Get Items Children
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getMetadataChildren",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetMetadataChildrenRequest{
|
||||
RatingKey: ratingKey,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getMetadataChildren",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -3817,13 +3832,6 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64, in
|
||||
// GetTopWatchedContent - Get Top Watched Content
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getTopWatchedContent",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetTopWatchedContentRequest{
|
||||
IncludeGuids: includeGuids,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getTopWatchedContent",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -4070,13 +4086,6 @@ func (s *Library) GetTopWatchedContent(ctx context.Context, type_ operations.Get
|
||||
// GetOnDeck - Get On Deck
|
||||
// This endpoint will return the on deck content.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getOnDeck",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
44
log.go
44
log.go
@@ -29,13 +29,6 @@ func newLog(sdkConfig sdkConfiguration) *Log {
|
||||
// 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.
|
||||
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{
|
||||
Level: level,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "logLine",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
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"`)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -515,13 +516,6 @@ func (s *Log) LogMultiLine(ctx context.Context, request string, opts ...operatio
|
||||
// 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.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "enablePaperTrail",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
75
media.go
75
media.go
@@ -29,13 +29,6 @@ func newMedia(sdkConfig sdkConfiguration) *Media {
|
||||
// MarkPlayed - Mark Media 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "markPlayed",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.MarkPlayedRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "markPlayed",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -261,13 +262,6 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64, opts ...operations.
|
||||
// MarkUnplayed - Mark Media 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "markUnplayed",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.MarkUnplayedRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "markUnplayed",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -493,13 +495,6 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64, opts ...operation
|
||||
// UpdatePlayProgress - Update Media Play Progress
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "updatePlayProgress",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.UpdatePlayProgressRequest{
|
||||
Key: key,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "updatePlayProgress",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -727,13 +730,6 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64
|
||||
// GetBannerImage - Get Banner Image
|
||||
// Gets the banner image of the media item
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-banner-image",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -971,13 +975,6 @@ func (s *Media) GetBannerImage(ctx context.Context, request operations.GetBanner
|
||||
// GetThumbImage - Get Thumb Image
|
||||
// Gets the thumbnail image of the media item
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-thumb-image",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
@@ -562,7 +562,7 @@ type GetTokenDetailsUserPlexAccount struct {
|
||||
Subscription Subscription `json:"subscription"`
|
||||
// Description of the Plex Pass subscription
|
||||
SubscriptionDescription *string `json:"subscriptionDescription"`
|
||||
Subscriptions []GetTokenDetailsSubscription `json:"subscriptions"`
|
||||
Subscriptions []GetTokenDetailsSubscription `json:"subscriptions,omitempty"`
|
||||
// URL of the account thumbnail
|
||||
Thumb string `json:"thumb"`
|
||||
// The title of the account (username or friendly name)
|
||||
@@ -827,7 +827,7 @@ func (o *GetTokenDetailsUserPlexAccount) GetSubscriptionDescription() *string {
|
||||
|
||||
func (o *GetTokenDetailsUserPlexAccount) GetSubscriptions() []GetTokenDetailsSubscription {
|
||||
if o == nil {
|
||||
return []GetTokenDetailsSubscription{}
|
||||
return nil
|
||||
}
|
||||
return o.Subscriptions
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ type PostUsersSignInDataUserPlexAccount struct {
|
||||
Subscription PostUsersSignInDataSubscription `json:"subscription"`
|
||||
// Description of the Plex Pass subscription
|
||||
SubscriptionDescription *string `json:"subscriptionDescription"`
|
||||
Subscriptions []PostUsersSignInDataAuthenticationSubscription `json:"subscriptions"`
|
||||
Subscriptions []PostUsersSignInDataAuthenticationSubscription `json:"subscriptions,omitempty"`
|
||||
// URL of the account thumbnail
|
||||
Thumb string `json:"thumb"`
|
||||
// The title of the account (username or friendly name)
|
||||
@@ -1115,7 +1115,7 @@ func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptionDescription() *strin
|
||||
|
||||
func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptions() []PostUsersSignInDataAuthenticationSubscription {
|
||||
if o == nil {
|
||||
return []PostUsersSignInDataAuthenticationSubscription{}
|
||||
return nil
|
||||
}
|
||||
return o.Subscriptions
|
||||
}
|
||||
|
||||
135
playlists.go
135
playlists.go
@@ -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`).
|
||||
// - `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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "createPlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "createPlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -282,13 +283,6 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
|
||||
// GetPlaylists - Get All Playlists
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getPlaylists",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetPlaylistsRequest{
|
||||
PlaylistType: playlistType,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getPlaylists",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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:
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getPlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetPlaylistRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getPlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -784,13 +787,6 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64, opts ..
|
||||
// DeletePlaylist - Deletes a Playlist
|
||||
// This endpoint will delete a playlist
|
||||
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{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "deletePlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1012,13 +1016,6 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64, opts
|
||||
// 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}`
|
||||
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{
|
||||
PlaylistID: playlistID,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "updatePlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getPlaylistContents",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetPlaylistContentsRequest{
|
||||
PlaylistID: playlistID,
|
||||
Type: type_,
|
||||
@@ -1284,6 +1282,14 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64,
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1502,13 +1508,6 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64,
|
||||
// ClearPlaylistContents - Delete Playlist Contents
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "clearPlaylistContents",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.ClearPlaylistContentsRequest{
|
||||
PlaylistID: playlistID,
|
||||
}
|
||||
@@ -1536,6 +1535,14 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6
|
||||
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
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "addPlaylistContents",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.AddPlaylistContentsRequest{
|
||||
PlaylistID: playlistID,
|
||||
URI: uri,
|
||||
@@ -1767,6 +1767,14 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64,
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1985,13 +1993,6 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64,
|
||||
// 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.
|
||||
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{
|
||||
Path: path,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "uploadPlaylist",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
105
plex.go
105
plex.go
@@ -29,13 +29,6 @@ func newPlex(sdkConfig sdkConfiguration) *Plex {
|
||||
// GetCompanionsData - Get Companions Data
|
||||
// Get Companions Data
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getCompanionsData",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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
|
||||
// Get friends of provided auth token.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getUserFriends",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -515,13 +517,6 @@ func (s *Plex) GetUserFriends(ctx context.Context, opts ...operations.Option) (*
|
||||
// GetGeoData - Get Geo Data
|
||||
// Returns the geolocation and locale data of the caller
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getGeoData",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -754,13 +757,6 @@ func (s *Plex) GetGeoData(ctx context.Context, opts ...operations.Option) (*oper
|
||||
// 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.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getHomeData",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -998,13 +1002,6 @@ func (s *Plex) GetHomeData(ctx context.Context, opts ...operations.Option) (*ope
|
||||
// GetServerResources - Get Server Resources
|
||||
// Get Plex server access tokens and server connections
|
||||
func (s *Plex) GetServerResources(ctx context.Context, 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{
|
||||
IncludeHTTPS: includeHTTPS,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-server-resources",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1254,13 +1259,6 @@ func (s *Plex) GetServerResources(ctx context.Context, clientID string, includeH
|
||||
// GetPin - Get a Pin
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getPin",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getPin",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getTokenByPinId",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getTokenByPinId",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
@@ -299,9 +299,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
||||
sdkConfiguration: sdkConfiguration{
|
||||
Language: "go",
|
||||
OpenAPIDocVersion: "0.0.3",
|
||||
SDKVersion: "0.19.0",
|
||||
GenVersion: "2.506.0",
|
||||
UserAgent: "speakeasy-sdk/go 0.19.0 2.506.0 0.0.3 github.com/LukeHagar/plexgo",
|
||||
SDKVersion: "0.19.1",
|
||||
GenVersion: "2.545.4",
|
||||
UserAgent: "speakeasy-sdk/go 0.19.1 2.545.4 0.0.3 github.com/LukeHagar/plexgo",
|
||||
ServerDefaults: []map[string]string{
|
||||
{
|
||||
"protocol": "https",
|
||||
|
||||
45
search.go
45
search.go
@@ -41,13 +41,6 @@ func newSearch(sdkConfig sdkConfiguration) *Search {
|
||||
//
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "performSearch",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.PerformSearchRequest{
|
||||
Query: query,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "performSearch",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
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.
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "performVoiceSearch",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.PerformVoiceSearchRequest{
|
||||
Query: query,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "performVoiceSearch",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -512,13 +514,6 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID
|
||||
// GetSearchResults - Get Search Results
|
||||
// This will search the database for the string provided.
|
||||
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{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getSearchResults",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
135
server.go
135
server.go
@@ -29,13 +29,6 @@ func newServer(sdkConfig sdkConfiguration) *Server {
|
||||
// GetServerCapabilities - Get Server Capabilities
|
||||
// Get Server Capabilities
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getServerCapabilities",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -273,13 +274,6 @@ func (s *Server) GetServerCapabilities(ctx context.Context, opts ...operations.O
|
||||
// GetServerPreferences - Get Server Preferences
|
||||
// Get Server Preferences
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getServerPreferences",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -517,13 +519,6 @@ func (s *Server) GetServerPreferences(ctx context.Context, opts ...operations.Op
|
||||
// GetAvailableClients - Get Available Clients
|
||||
// Get Available Clients
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getAvailableClients",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -761,13 +764,6 @@ func (s *Server) GetAvailableClients(ctx context.Context, opts ...operations.Opt
|
||||
// GetDevices - Get Devices
|
||||
// Get Devices
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getDevices",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1005,13 +1009,6 @@ func (s *Server) GetDevices(ctx context.Context, opts ...operations.Option) (*op
|
||||
// GetServerIdentity - Get Server Identity
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-server-identity",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-server-identity",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1223,13 +1228,6 @@ func (s *Server) GetServerIdentity(ctx context.Context, opts ...operations.Optio
|
||||
// GetMyPlexAccount - Get MyPlex Account
|
||||
// Returns MyPlex Account Information
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getMyPlexAccount",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1467,13 +1473,6 @@ func (s *Server) GetMyPlexAccount(ctx context.Context, opts ...operations.Option
|
||||
// GetResizedPhoto - Get a Resized Photo
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getResizedPhoto",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getResizedPhoto",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1695,13 +1702,6 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
|
||||
// GetMediaProviders - Get Media Providers
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "get-media-providers",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetMediaProvidersRequest{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-media-providers",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -1945,13 +1953,6 @@ func (s *Server) GetMediaProviders(ctx context.Context, xPlexToken string, opts
|
||||
// GetServerList - Get Server List
|
||||
// Get Server List
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getServerList",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
60
sessions.go
60
sessions.go
@@ -29,13 +29,6 @@ func newSessions(sdkConfig sdkConfiguration) *Sessions {
|
||||
// GetSessions - Get Active Sessions
|
||||
// This will retrieve the "Now Playing" Information of the PMS.
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getSessions",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -273,13 +274,6 @@ func (s *Sessions) GetSessions(ctx context.Context, opts ...operations.Option) (
|
||||
// GetSessionHistory - Get Session History
|
||||
// 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) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getSessionHistory",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetSessionHistoryRequest{
|
||||
Sort: sort,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getSessionHistory",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -528,13 +530,6 @@ func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountI
|
||||
// GetTranscodeSessions - Get Transcode Sessions
|
||||
// Get Transcode Sessions
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -558,6 +553,14 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -772,13 +775,6 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context, opts ...operations.
|
||||
// StopTranscodeSession - Stop a Transcode Session
|
||||
// Stop a Transcode Session
|
||||
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{
|
||||
SessionKey: sessionKey,
|
||||
}
|
||||
@@ -806,6 +802,14 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string,
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
@@ -29,13 +29,6 @@ func newStatistics(sdkConfig sdkConfiguration) *Statistics {
|
||||
// GetStatistics - Get Media Statistics
|
||||
// This will return the media statistics for the server
|
||||
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{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getStatistics",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -281,13 +282,6 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64, opts ..
|
||||
// GetResourcesStatistics - Get Resources Statistics
|
||||
// This will return the resources for the server
|
||||
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{
|
||||
Timespan: timespan,
|
||||
}
|
||||
@@ -315,6 +309,14 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -533,13 +535,6 @@ func (s *Statistics) GetResourcesStatistics(ctx context.Context, timespan *int64
|
||||
// GetBandwidthStatistics - Get Bandwidth Statistics
|
||||
// This will return the bandwidth statistics for the server
|
||||
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{
|
||||
Timespan: timespan,
|
||||
}
|
||||
@@ -567,6 +562,14 @@ func (s *Statistics) GetBandwidthStatistics(ctx context.Context, timespan *int64
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
45
updater.go
45
updater.go
@@ -30,13 +30,6 @@ func newUpdater(sdkConfig sdkConfiguration) *Updater {
|
||||
// GetUpdateStatus - Querying status of updates
|
||||
// Querying status of updates
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getUpdateStatus",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -274,13 +275,6 @@ func (s *Updater) GetUpdateStatus(ctx context.Context, opts ...operations.Option
|
||||
// CheckForUpdates - Checking for updates
|
||||
// Checking for updates
|
||||
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{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "checkForUpdates",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -506,13 +508,6 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down
|
||||
// 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
|
||||
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{
|
||||
Tonight: tonight,
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "applyUpdates",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
15
users.go
15
users.go
@@ -28,13 +28,6 @@ func newUsers(sdkConfig sdkConfiguration) *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
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-users",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: nil,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
30
video.go
30
video.go
@@ -29,13 +29,6 @@ func newVideo(sdkConfig sdkConfiguration) *Video {
|
||||
// GetTimeline - Get the timeline for a media item
|
||||
// Get the timeline for a media item
|
||||
func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineRequest, opts ...operations.Option) (*operations.GetTimelineResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getTimeline",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "getTimeline",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
@@ -257,13 +258,6 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
|
||||
// StartUniversalTranscode - Start Universal Transcode
|
||||
// Begin a Universal Transcode Session
|
||||
func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.StartUniversalTranscodeRequest, opts ...operations.Option) (*operations.StartUniversalTranscodeResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "startUniversalTranscode",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
o := operations.Options{}
|
||||
supportedOptions := []string{
|
||||
operations.SupportedOptionRetries,
|
||||
@@ -287,6 +281,14 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
|
||||
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
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
15
watchlist.go
15
watchlist.go
@@ -28,13 +28,6 @@ func newWatchlist(sdkConfig sdkConfiguration) *Watchlist {
|
||||
// GetWatchList - Get User Watchlist
|
||||
// Get User Watchlist
|
||||
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{}
|
||||
supportedOptions := []string{
|
||||
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)
|
||||
}
|
||||
|
||||
hookCtx := hooks.HookContext{
|
||||
BaseURL: baseURL,
|
||||
Context: ctx,
|
||||
OperationID: "get-watch-list",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
timeout := o.Timeout
|
||||
if timeout == nil {
|
||||
timeout = s.sdkConfiguration.Timeout
|
||||
|
||||
Reference in New Issue
Block a user