mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7fe60ed91 | ||
|
|
b09c6ad37a | ||
|
|
6a5cd06342 | ||
|
|
9531527f23 | ||
|
|
db2b15241c | ||
|
|
344db7cbcb | ||
|
|
af9748433a | ||
|
|
8f332b739e | ||
|
|
c504a2d46e | ||
|
|
95d64024f2 | ||
|
|
457b36fb49 | ||
|
|
8691720920 | ||
|
|
205c454485 | ||
|
|
71b5f4f4b7 | ||
|
|
f3779b0079 | ||
|
|
0eaf609b40 | ||
|
|
b0931cba2e | ||
|
|
d09f9292ce | ||
|
|
9a382342e4 | ||
|
|
b8b984dc14 |
@@ -15,14 +15,10 @@ permissions:
|
|||||||
- cron: 0 0 * * *
|
- cron: 0 0 * * *
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
|
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
|
||||||
with:
|
with:
|
||||||
force: ${{ github.event.inputs.force }}
|
force: ${{ github.event.inputs.force }}
|
||||||
languages: |
|
|
||||||
- go
|
|
||||||
mode: direct
|
mode: direct
|
||||||
openapi_docs: |
|
|
||||||
- https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
|
||||||
speakeasy_version: latest
|
speakeasy_version: latest
|
||||||
secrets:
|
secrets:
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
||||||
management:
|
management:
|
||||||
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
|
docChecksum: 7a43cd3413d535205cfaee20a4b6a250
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.244.0
|
speakeasyVersion: 1.279.0
|
||||||
generationVersion: 2.301.0
|
generationVersion: 2.322.5
|
||||||
releaseVersion: 0.6.2
|
releaseVersion: 0.6.7
|
||||||
configChecksum: acec136a1f3ec962b5f7a52fe3035935
|
configChecksum: 78af15bfd6f8be83ea08e1ad8e8c4ace
|
||||||
repoURL: https://github.com/LukeHagar/plexgo.git
|
repoURL: https://github.com/LukeHagar/plexgo.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
installationURL: https://github.com/LukeHagar/plexgo
|
installationURL: https://github.com/LukeHagar/plexgo
|
||||||
@@ -14,14 +14,14 @@ management:
|
|||||||
features:
|
features:
|
||||||
go:
|
go:
|
||||||
constsAndDefaults: 0.1.4
|
constsAndDefaults: 0.1.4
|
||||||
core: 3.4.6
|
core: 3.4.7
|
||||||
flattening: 2.81.1
|
flattening: 2.81.1
|
||||||
globalSecurity: 2.82.9
|
globalSecurity: 2.82.9
|
||||||
globalServerURLs: 2.82.2
|
globalServerURLs: 2.82.2
|
||||||
globals: 2.82.1
|
globals: 2.82.2
|
||||||
methodServerURLs: 2.82.1
|
methodServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.2
|
nameOverrides: 2.81.2
|
||||||
responseFormat: 0.1.0
|
responseFormat: 0.1.1
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- server.go
|
- server.go
|
||||||
- media.go
|
- media.go
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ generation:
|
|||||||
optionalPropertyRendering: withExample
|
optionalPropertyRendering: withExample
|
||||||
useClassNamesForArrayFields: true
|
useClassNamesForArrayFields: true
|
||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: false
|
nameResolutionDec2023: true
|
||||||
parameterOrderingFeb2024: false
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: false
|
requestResponseComponentNamesFeb2024: true
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: false
|
oAuth2ClientCredentialsEnabled: true
|
||||||
go:
|
go:
|
||||||
version: 0.6.2
|
version: 0.6.7
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
16
.speakeasy/workflow.lock
Normal file
16
.speakeasy/workflow.lock
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
speakeasyVersion: 1.279.0
|
||||||
|
sources: {}
|
||||||
|
targets: {}
|
||||||
|
workflow:
|
||||||
|
workflowVersion: 1.0.0
|
||||||
|
speakeasyVersion: latest
|
||||||
|
sources:
|
||||||
|
my-source:
|
||||||
|
inputs:
|
||||||
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||||
|
targets:
|
||||||
|
plexgo:
|
||||||
|
target: go
|
||||||
|
source: my-source
|
||||||
|
codeSamples:
|
||||||
|
output: codeSamples.yaml
|
||||||
12
.speakeasy/workflow.yaml
Normal file
12
.speakeasy/workflow.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
workflowVersion: 1.0.0
|
||||||
|
speakeasyVersion: latest
|
||||||
|
sources:
|
||||||
|
my-source:
|
||||||
|
inputs:
|
||||||
|
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||||
|
targets:
|
||||||
|
plexgo:
|
||||||
|
target: go
|
||||||
|
source: my-source
|
||||||
|
codeSamples:
|
||||||
|
output: codeSamples.yaml
|
||||||
20
README.md
20
README.md
@@ -33,7 +33,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -185,7 +185,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -236,7 +236,7 @@ func main() {
|
|||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithServerIndex(0),
|
plexgo.WithServerIndex(0),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -275,7 +275,7 @@ func main() {
|
|||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
|
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -304,12 +304,12 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
var strong *bool = plexgo.Bool(false)
|
var strong *bool = plexgo.Bool(false)
|
||||||
|
|
||||||
var xPlexClientIdentifier *string = plexgo.String("<value>")
|
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Plex.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), strong, xPlexClientIdentifier)
|
res, err := s.Plex.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), strong, xPlexClientIdentifier)
|
||||||
@@ -377,7 +377,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -424,7 +424,7 @@ d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on
|
|||||||
|
|
||||||
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
||||||
|
|
||||||
For example, you can set `X-Plex-Client-Identifier` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
For example, you can set `X-Plex-Client-Identifier` to `"Postman"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
||||||
|
|
||||||
|
|
||||||
### Available Globals
|
### Available Globals
|
||||||
@@ -452,12 +452,12 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
var strong *bool = plexgo.Bool(false)
|
var strong *bool = plexgo.Bool(false)
|
||||||
|
|
||||||
var xPlexClientIdentifier *string = plexgo.String("<value>")
|
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
||||||
|
|||||||
124
RELEASES.md
124
RELEASES.md
@@ -229,3 +229,127 @@ Based on:
|
|||||||
- [go v0.6.2] .
|
- [go v0.6.2] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.6.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.2 - .
|
- [Go v0.6.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.2 - .
|
||||||
|
|
||||||
|
## 2024-04-10 00:44:38
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.245.0 (2.301.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.3] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.3 - .
|
||||||
|
|
||||||
|
## 2024-04-22 16:14:47
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.267.2 (2.312.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.4] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.4] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.4 - .
|
||||||
|
|
||||||
|
## 2024-04-24 00:45:20
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.271.0 (2.312.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
|
||||||
|
## 2024-04-25 00:48:55
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
|
||||||
|
## 2024-04-26 00:46:09
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.274.1 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
|
||||||
|
## 2024-04-27 00:45:23
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-04-28 00:50:52
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-04-29 00:47:20
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.276.0 (2.314.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-04-30 00:45:49
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.277.0 (2.317.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-05-01 00:50:59
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-05-02 00:45:48
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.277.4 (2.318.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.5] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.5] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.5 - .
|
||||||
|
|
||||||
|
## 2024-05-03 00:50:00
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.277.8 (2.319.10) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.6] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.6] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.6 - .
|
||||||
|
|
||||||
|
## 2024-05-04 00:46:06
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.279.0 (2.322.5) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.6.7] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.6.7] https://github.com/LukeHagar/plexgo/releases/tag/v0.6.7 - .
|
||||||
2
USAGE.md
2
USAGE.md
@@ -12,7 +12,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|||||||
@@ -75,9 +75,11 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -185,9 +187,11 @@ func (s *Activities) CancelServerActivities(ctx context.Context, activityUUID st
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
@@ -78,9 +78,11 @@ func (s *Authentication) GetTransientToken(ctx context.Context, type_ operations
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -182,9 +184,11 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, sou
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
20
butler.go
20
butler.go
@@ -69,9 +69,11 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -179,9 +181,11 @@ func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksRe
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -274,9 +278,11 @@ func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResp
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -377,9 +383,11 @@ func (s *Butler) StartTask(ctx context.Context, taskName operations.TaskName) (*
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -478,9 +486,11 @@ func (s *Butler) StopTask(ctx context.Context, taskName operations.PathParamTask
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "404", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
2021
codeSamples.yaml
Normal file
2021
codeSamples.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
| `Tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
|
||||||
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
| `Skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||||
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
|
| `ActivityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||||
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
| `Download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
|
| `Strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||||
| `XPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `XPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| `Timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
| `Timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||||
@@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
| `RatingKey` | *float64* | :heavy_check_mark: | The rating key of the media item |
|
| `RatingKey` | *float64* | :heavy_check_mark: | The rating key of the media item | 23409 |
|
||||||
| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for |
|
| `Key` | *string* | :heavy_check_mark: | The key of the media item to get the timeline for | /library/metadata/23409 |
|
||||||
| `State` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item |
|
| `State` | [operations.State](../../models/operations/state.md) | :heavy_check_mark: | The state of the media item | playing |
|
||||||
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE |
|
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE | 1 |
|
||||||
| `Time` | *float64* | :heavy_check_mark: | The time of the media item |
|
| `Time` | *float64* | :heavy_check_mark: | The time of the media item | 2000 |
|
||||||
| `Duration` | *float64* | :heavy_check_mark: | The duration of the media item |
|
| `Duration` | *float64* | :heavy_check_mark: | The duration of the media item | 10000 |
|
||||||
| `Context` | *string* | :heavy_check_mark: | The context of the media item |
|
| `Context` | *string* | :heavy_check_mark: | The context of the media item | home:hub.continueWatching |
|
||||||
| `PlayQueueItemID` | *float64* | :heavy_check_mark: | The play queue item ID of the media item |
|
| `PlayQueueItemID` | *float64* | :heavy_check_mark: | The play queue item ID of the media item | 1 |
|
||||||
| `PlayBackTime` | *float64* | :heavy_check_mark: | The playback time of the media item |
|
| `PlayBackTime` | *float64* | :heavy_check_mark: | The playback time of the media item | 2000 |
|
||||||
| `Row` | *float64* | :heavy_check_mark: | The row of the media item |
|
| `Row` | *float64* | :heavy_check_mark: | The row of the media item | 1 |
|
||||||
@@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `XPlexClientIdentifier` | *string* | :heavy_check_mark: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
| `PinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
||||||
| `XPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `XPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
@@ -3,21 +3,21 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||||
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE |
|
| `HasMDE` | *float64* | :heavy_check_mark: | Whether the media item has MDE | 1 |
|
||||||
| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode |
|
| `Path` | *string* | :heavy_check_mark: | The path to the media item to transcode | /library/metadata/23409 |
|
||||||
| `MediaIndex` | *float64* | :heavy_check_mark: | The index of the media item to transcode |
|
| `MediaIndex` | *float64* | :heavy_check_mark: | The index of the media item to transcode | 0 |
|
||||||
| `PartIndex` | *float64* | :heavy_check_mark: | The index of the part to transcode |
|
| `PartIndex` | *float64* | :heavy_check_mark: | The index of the part to transcode | 0 |
|
||||||
| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session |
|
| `Protocol` | *string* | :heavy_check_mark: | The protocol to use for the transcode session | hls |
|
||||||
| `FastSeek` | **float64* | :heavy_minus_sign: | Whether to use fast seek or not |
|
| `FastSeek` | **float64* | :heavy_minus_sign: | Whether to use fast seek or not | 0 |
|
||||||
| `DirectPlay` | **float64* | :heavy_minus_sign: | Whether to use direct play or not |
|
| `DirectPlay` | **float64* | :heavy_minus_sign: | Whether to use direct play or not | 0 |
|
||||||
| `DirectStream` | **float64* | :heavy_minus_sign: | Whether to use direct stream or not |
|
| `DirectStream` | **float64* | :heavy_minus_sign: | Whether to use direct stream or not | 0 |
|
||||||
| `SubtitleSize` | **float64* | :heavy_minus_sign: | The size of the subtitles |
|
| `SubtitleSize` | **float64* | :heavy_minus_sign: | The size of the subtitles | 100 |
|
||||||
| `Subtites` | **string* | :heavy_minus_sign: | The subtitles |
|
| `Subtites` | **string* | :heavy_minus_sign: | The subtitles | burn |
|
||||||
| `AudioBoost` | **float64* | :heavy_minus_sign: | The audio boost |
|
| `AudioBoost` | **float64* | :heavy_minus_sign: | The audio boost | 100 |
|
||||||
| `Location` | **string* | :heavy_minus_sign: | The location of the transcode session |
|
| `Location` | **string* | :heavy_minus_sign: | The location of the transcode session | lan |
|
||||||
| `MediaBufferSize` | **float64* | :heavy_minus_sign: | The size of the media buffer |
|
| `MediaBufferSize` | **float64* | :heavy_minus_sign: | The size of the media buffer | 102400 |
|
||||||
| `Session` | **string* | :heavy_minus_sign: | The session ID |
|
| `Session` | **string* | :heavy_minus_sign: | The session ID | zvcage8b7rkioqcm8f4uns4c |
|
||||||
| `AddDebugOverlay` | **float64* | :heavy_minus_sign: | Whether to add a debug overlay or not |
|
| `AddDebugOverlay` | **float64* | :heavy_minus_sign: | Whether to add a debug overlay or not | 0 |
|
||||||
| `AutoAdjustQuality` | **float64* | :heavy_minus_sign: | Whether to auto adjust quality or not |
|
| `AutoAdjustQuality` | **float64* | :heavy_minus_sign: | Whether to auto adjust quality or not | 0 |
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `Key` | *string* | :heavy_check_mark: | the media key |
|
| `Key` | *string* | :heavy_check_mark: | the media key | |
|
||||||
| `Time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
|
| `Time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
|
||||||
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. |
|
| `State` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
|
||||||
@@ -36,7 +36,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -84,11 +84,11 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var activityUUID string = "<value>"
|
var activityUUID string = "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Activities.CancelServerActivities(ctx, activityUUID)
|
res, err := s.Activities.CancelServerActivities(ctx, activityUUID)
|
||||||
@@ -103,10 +103,10 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. |
|
| `activityUUID` | *string* | :heavy_check_mark: | The UUID of the activity to cancel. | 25b71ed5-0f9d-461c-baa7-d404e9e10d3e |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -86,7 +86,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -135,7 +135,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -189,7 +189,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -149,7 +149,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -237,7 +237,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -365,7 +365,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -420,7 +420,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -491,7 +491,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -546,7 +546,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -652,7 +652,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -164,7 +164,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -136,15 +136,15 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var key string = "<value>"
|
var key string = "<value>"
|
||||||
|
|
||||||
var time float64 = 6900.91
|
var time float64 = 90000
|
||||||
|
|
||||||
var state string = "<value>"
|
var state string = "played"
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Media.UpdatePlayProgress(ctx, key, time, state)
|
res, err := s.Media.UpdatePlayProgress(ctx, key, time, state)
|
||||||
@@ -159,12 +159,12 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `key` | *string* | :heavy_check_mark: | the media key |
|
| `key` | *string* | :heavy_check_mark: | the media key | |
|
||||||
| `time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. |
|
| `time` | *float64* | :heavy_check_mark: | The time, in milliseconds, used to set the media playback progress. | 90000 |
|
||||||
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. |
|
| `state` | *string* | :heavy_check_mark: | The playback state of the media item. | played |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -99,7 +99,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ import(
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var strong *bool = plexgo.Bool(false)
|
var strong *bool = plexgo.Bool(false)
|
||||||
|
|
||||||
var xPlexClientIdentifier *string = plexgo.String("<value>")
|
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
|
||||||
@@ -49,12 +49,12 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> |
|
| `strong` | **bool* | :heavy_minus_sign: | Determines the kind of code returned by the API call<br/>Strong codes are used for Pin authentication flows<br/>Non-Strong codes are used for `Plex.tv/link`<br/> | |
|
||||||
| `xPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `xPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
@@ -82,13 +82,13 @@ import(
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var pinID string = "<value>"
|
var pinID string = "<value>"
|
||||||
|
|
||||||
var xPlexClientIdentifier *string = plexgo.String("<value>")
|
var xPlexClientIdentifier *string = plexgo.String("Postman")
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Plex.GetToken(ctx, pinID, xPlexClientIdentifier)
|
res, err := s.Plex.GetToken(ctx, pinID, xPlexClientIdentifier)
|
||||||
@@ -103,12 +103,12 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for |
|
| `pinID` | *string* | :heavy_check_mark: | The PinID to retrieve an access token for | |
|
||||||
| `xPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> |
|
| `xPlexClientIdentifier` | **string* | :heavy_minus_sign: | The unique identifier for the client application<br/>This is used to track the client application and its usage<br/>(UUID, serial number, or other number unique per device)<br/> | Postman |
|
||||||
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |
|
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -84,7 +84,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -132,7 +132,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -180,7 +180,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -228,7 +228,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -276,7 +276,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -326,7 +326,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -383,7 +383,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -80,7 +80,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -128,7 +128,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -176,7 +176,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var timespan *int64 = plexgo.Int64(411769)
|
var timespan *int64 = plexgo.Int64(4)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Statistics.GetStatistics(ctx, timespan)
|
res, err := s.Statistics.GetStatistics(ctx, timespan)
|
||||||
@@ -48,10 +48,10 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> |
|
| `timespan` | **int64* | :heavy_minus_sign: | The timespan to retrieve statistics for<br/>the exact meaning of this parameter is not known<br/> | 4 |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
@@ -81,7 +81,7 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -100,10 +100,10 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. |
|
| `download` | [*operations.Download](../../models/operations/download.md) | :heavy_minus_sign: | Indicate that you want to start download any updates found. | 1 |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
@@ -135,13 +135,13 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
var tonight *operations.Tonight = operations.TonightOne.ToPointer()
|
var tonight *operations.Tonight = operations.TonightOne.ToPointer()
|
||||||
|
|
||||||
var skip *operations.Skip = operations.SkipZero.ToPointer()
|
var skip *operations.Skip = operations.SkipOne.ToPointer()
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Updater.ApplyUpdates(ctx, tonight, skip)
|
res, err := s.Updater.ApplyUpdates(ctx, tonight, skip)
|
||||||
@@ -156,11 +156,11 @@ func main() {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
|
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | |
|
||||||
| `tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install |
|
| `tonight` | [*operations.Tonight](../../models/operations/tonight.md) | :heavy_minus_sign: | Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install | 1 |
|
||||||
| `skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. |
|
| `skip` | [*operations.Skip](../../models/operations/skip.md) | :heavy_minus_sign: | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | 1 |
|
||||||
|
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|||||||
@@ -31,21 +31,21 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{
|
res, err := s.Video.GetTimeline(ctx, operations.GetTimelineRequest{
|
||||||
RatingKey: 716.56,
|
RatingKey: 23409,
|
||||||
Key: "<key>",
|
Key: "/library/metadata/23409",
|
||||||
State: operations.StatePaused,
|
State: operations.StatePlaying,
|
||||||
HasMDE: 7574.33,
|
HasMDE: 1,
|
||||||
Time: 3327.51,
|
Time: 2000,
|
||||||
Duration: 7585.39,
|
Duration: 10000,
|
||||||
Context: "<value>",
|
Context: "home:hub.continueWatching",
|
||||||
PlayQueueItemID: 1406.21,
|
PlayQueueItemID: 1,
|
||||||
PlayBackTime: 2699.34,
|
PlayBackTime: 2000,
|
||||||
Row: 3536.42,
|
Row: 1,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@@ -92,16 +92,27 @@ import(
|
|||||||
func main() {
|
func main() {
|
||||||
s := plexgo.New(
|
s := plexgo.New(
|
||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
plexgo.WithXPlexClientIdentifier("<value>"),
|
plexgo.WithXPlexClientIdentifier("Postman"),
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{
|
res, err := s.Video.StartUniversalTranscode(ctx, operations.StartUniversalTranscodeRequest{
|
||||||
HasMDE: 8924.99,
|
HasMDE: 1,
|
||||||
Path: "/etc/mail",
|
Path: "/library/metadata/23409",
|
||||||
MediaIndex: 9962.95,
|
MediaIndex: 0,
|
||||||
PartIndex: 1232.82,
|
PartIndex: 0,
|
||||||
Protocol: "<value>",
|
Protocol: "hls",
|
||||||
|
FastSeek: plexgo.Float64(0),
|
||||||
|
DirectPlay: plexgo.Float64(0),
|
||||||
|
DirectStream: plexgo.Float64(0),
|
||||||
|
SubtitleSize: plexgo.Float64(100),
|
||||||
|
Subtites: plexgo.String("burn"),
|
||||||
|
AudioBoost: plexgo.Float64(100),
|
||||||
|
Location: plexgo.String("lan"),
|
||||||
|
MediaBufferSize: plexgo.Float64(102400),
|
||||||
|
Session: plexgo.String("zvcage8b7rkioqcm8f4uns4c"),
|
||||||
|
AddDebugOverlay: plexgo.Float64(0),
|
||||||
|
AutoAdjustQuality: plexgo.Float64(0),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
8
hubs.go
8
hubs.go
@@ -78,9 +78,11 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, count *float64, onlyTransient
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -194,9 +196,11 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, sectionID float64, count *flo
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
@@ -260,6 +261,18 @@ func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error)
|
|||||||
|
|
||||||
typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v))
|
typ, val := dereferencePointers(reflect.TypeOf(v), reflect.ValueOf(v))
|
||||||
switch typ.Kind() {
|
switch typ.Kind() {
|
||||||
|
case reflect.Int64:
|
||||||
|
format := tag.Get("integer")
|
||||||
|
if format == "string" {
|
||||||
|
b := val.Interface().(int64)
|
||||||
|
return []byte(fmt.Sprintf(`"%d"`, b)), nil
|
||||||
|
}
|
||||||
|
case reflect.Float64:
|
||||||
|
format := tag.Get("number")
|
||||||
|
if format == "string" {
|
||||||
|
b := val.Interface().(float64)
|
||||||
|
return []byte(fmt.Sprintf(`"%g"`, b)), nil
|
||||||
|
}
|
||||||
case reflect.Map:
|
case reflect.Map:
|
||||||
if isNil(typ, val) {
|
if isNil(typ, val) {
|
||||||
return []byte("null"), nil
|
return []byte("null"), nil
|
||||||
@@ -349,6 +362,16 @@ func handleDefaultConstValue(tagValue string, val interface{}, tag reflect.Struc
|
|||||||
if bigIntTag == "string" {
|
if bigIntTag == "string" {
|
||||||
return []byte(fmt.Sprintf(`"%s"`, tagValue))
|
return []byte(fmt.Sprintf(`"%s"`, tagValue))
|
||||||
}
|
}
|
||||||
|
case reflect.TypeOf(int64(0)):
|
||||||
|
format := tag.Get("integer")
|
||||||
|
if format == "string" {
|
||||||
|
return []byte(fmt.Sprintf(`"%s"`, tagValue))
|
||||||
|
}
|
||||||
|
case reflect.TypeOf(float64(0)):
|
||||||
|
format := tag.Get("number")
|
||||||
|
if format == "string" {
|
||||||
|
return []byte(fmt.Sprintf(`"%s"`, tagValue))
|
||||||
|
}
|
||||||
case reflect.TypeOf(decimal.Big{}):
|
case reflect.TypeOf(decimal.Big{}):
|
||||||
decimalTag := tag.Get("decimal")
|
decimalTag := tag.Get("decimal")
|
||||||
if decimalTag != "number" {
|
if decimalTag != "number" {
|
||||||
@@ -377,6 +400,57 @@ func unmarshalValue(value json.RawMessage, v reflect.Value, tag reflect.StructTa
|
|||||||
typ := dereferenceTypePointer(v.Type())
|
typ := dereferenceTypePointer(v.Type())
|
||||||
|
|
||||||
switch typ.Kind() {
|
switch typ.Kind() {
|
||||||
|
case reflect.Int64:
|
||||||
|
var b int64
|
||||||
|
|
||||||
|
format := tag.Get("integer")
|
||||||
|
if format == "string" {
|
||||||
|
var s string
|
||||||
|
if err := json.Unmarshal(value, &s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
b, err = strconv.ParseInt(s, 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to parse string as int64: %w", err)
|
||||||
|
}
|
||||||
|
if v.Kind() == reflect.Ptr {
|
||||||
|
if v.IsNil() {
|
||||||
|
v.Set(reflect.New(typ))
|
||||||
|
}
|
||||||
|
v = v.Elem()
|
||||||
|
}
|
||||||
|
|
||||||
|
v.Set(reflect.ValueOf(b))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
case reflect.Float64:
|
||||||
|
var b float64
|
||||||
|
|
||||||
|
format := tag.Get("number")
|
||||||
|
if format == "string" {
|
||||||
|
var s string
|
||||||
|
if err := json.Unmarshal(value, &s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
var err error
|
||||||
|
b, err = strconv.ParseFloat(s, 64)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to parse string as float64: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if v.Kind() == reflect.Ptr {
|
||||||
|
if v.IsNil() {
|
||||||
|
v.Set(reflect.New(typ))
|
||||||
|
}
|
||||||
|
v = v.Elem()
|
||||||
|
}
|
||||||
|
|
||||||
|
v.Set(reflect.ValueOf(b))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
case reflect.Map:
|
case reflect.Map:
|
||||||
if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) {
|
if bytes.Equal(value, []byte("null")) || !isComplexValueType(dereferenceTypePointer(typ.Elem())) {
|
||||||
if v.CanAddr() {
|
if v.CanAddr() {
|
||||||
|
|||||||
44
library.go
44
library.go
@@ -78,9 +78,11 @@ func (s *Library) GetFileHash(ctx context.Context, url_ string, type_ *float64)
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -173,9 +175,11 @@ func (s *Library) GetRecentlyAdded(ctx context.Context) (*operations.GetRecently
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -284,9 +288,11 @@ func (s *Library) GetLibraries(ctx context.Context) (*operations.GetLibrariesRes
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -437,9 +443,11 @@ func (s *Library) GetLibrary(ctx context.Context, sectionID float64, includeDeta
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -547,9 +555,11 @@ func (s *Library) DeleteLibrary(ctx context.Context, sectionID float64) (*operat
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -666,9 +676,11 @@ func (s *Library) GetLibraryItems(ctx context.Context, sectionID int64, tag oper
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -761,9 +773,11 @@ func (s *Library) RefreshLibrary(ctx context.Context, sectionID float64) (*opera
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -882,9 +896,11 @@ func (s *Library) SearchLibrary(ctx context.Context, sectionID int64, type_ oper
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -977,9 +993,11 @@ func (s *Library) GetMetadata(ctx context.Context, ratingKey float64) (*operatio
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -1087,9 +1105,11 @@ func (s *Library) GetMetadataChildren(ctx context.Context, ratingKey float64) (*
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -1193,9 +1213,11 @@ func (s *Library) GetOnDeck(ctx context.Context) (*operations.GetOnDeckResponse,
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
12
log.go
12
log.go
@@ -79,9 +79,11 @@ func (s *Log) LogLine(ctx context.Context, level operations.Level, message strin
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -200,9 +202,11 @@ func (s *Log) LogMultiLine(ctx context.Context, request string) (*operations.Log
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -295,9 +299,11 @@ func (s *Log) EnablePaperTrail(ctx context.Context) (*operations.EnablePaperTrai
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "403", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "403", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
12
media.go
12
media.go
@@ -77,9 +77,11 @@ func (s *Media) MarkPlayed(ctx context.Context, key float64) (*operations.MarkPl
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -180,9 +182,11 @@ func (s *Media) MarkUnplayed(ctx context.Context, key float64) (*operations.Mark
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -285,9 +289,11 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, key string, time float64
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
36
playlists.go
36
playlists.go
@@ -78,9 +78,11 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -193,9 +195,11 @@ func (s *Playlists) GetPlaylists(ctx context.Context, playlistType *operations.P
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -304,9 +308,11 @@ func (s *Playlists) GetPlaylist(ctx context.Context, playlistID float64) (*opera
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -414,9 +420,11 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, playlistID float64) (*op
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -519,9 +527,11 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, playlistID float64, titl
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -626,9 +636,11 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, playlistID float64,
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -736,9 +748,11 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, playlistID float6
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -842,9 +856,11 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, playlistID float64,
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -957,9 +973,11 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, path string, force opera
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
8
plex.go
8
plex.go
@@ -93,9 +93,11 @@ func (s *Plex) GetPin(ctx context.Context, strong *bool, xPlexClientIdentifier *
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -222,9 +224,11 @@ func (s *Plex) GetToken(ctx context.Context, pinID string, xPlexClientIdentifier
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
@@ -276,9 +276,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.6.2",
|
SDKVersion: "0.6.7",
|
||||||
GenVersion: "2.301.0",
|
GenVersion: "2.322.5",
|
||||||
UserAgent: "speakeasy-sdk/go 0.6.2 2.301.0 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.6.7 2.322.5 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
Globals: globals.Globals{},
|
Globals: globals.Globals{},
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
|
|||||||
12
search.go
12
search.go
@@ -91,9 +91,11 @@ func (s *Search) PerformSearch(ctx context.Context, query string, sectionID *flo
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -199,9 +201,11 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, query string, sectionID
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -302,9 +306,11 @@ func (s *Search) GetSearchResults(ctx context.Context, query string) (*operation
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
32
server.go
32
server.go
@@ -69,9 +69,11 @@ func (s *Server) GetServerCapabilities(ctx context.Context) (*operations.GetServ
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -175,9 +177,11 @@ func (s *Server) GetServerPreferences(ctx context.Context) (*operations.GetServe
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -281,9 +285,11 @@ func (s *Server) GetAvailableClients(ctx context.Context) (*operations.GetAvaila
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -387,9 +393,11 @@ func (s *Server) GetDevices(ctx context.Context) (*operations.GetDevicesResponse
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -493,9 +501,11 @@ func (s *Server) GetServerIdentity(ctx context.Context) (*operations.GetServerId
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -599,9 +609,11 @@ func (s *Server) GetMyPlexAccount(ctx context.Context) (*operations.GetMyPlexAcc
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -709,9 +721,11 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -804,9 +818,11 @@ func (s *Server) GetServerList(ctx context.Context) (*operations.GetServerListRe
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
16
sessions.go
16
sessions.go
@@ -69,9 +69,11 @@ func (s *Sessions) GetSessions(ctx context.Context) (*operations.GetSessionsResp
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -175,9 +177,11 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -281,9 +285,11 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context) (*operations.GetTra
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -391,9 +397,11 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, sessionKey string)
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
@@ -77,9 +77,11 @@ func (s *Statistics) GetStatistics(ctx context.Context, timespan *int64) (*opera
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
12
updater.go
12
updater.go
@@ -70,9 +70,11 @@ func (s *Updater) GetUpdateStatus(ctx context.Context) (*operations.GetUpdateSta
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -184,9 +186,11 @@ func (s *Updater) CheckForUpdates(ctx context.Context, download *operations.Down
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -288,9 +292,11 @@ func (s *Updater) ApplyUpdates(ctx context.Context, tonight *operations.Tonight,
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "500", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "500", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
8
video.go
8
video.go
@@ -73,9 +73,11 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
@@ -172,9 +174,11 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
|
|||||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
} else if utils.MatchStatusCodes([]string{"400", "401", "4XX", "5XX"}, httpRes.StatusCode) {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
} else if _httpRes != nil {
|
||||||
|
httpRes = _httpRes
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||||
|
|||||||
Reference in New Issue
Block a user