mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-09 20:47:45 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.228.1
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: e742591b-391d-4f4e-8484-d01a093b32ec
|
id: e742591b-391d-4f4e-8484-d01a093b32ec
|
||||||
management:
|
management:
|
||||||
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
|
docChecksum: a91eaf9ec1e6a3a6f4bf0571f5b18bae
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.227.0
|
speakeasyVersion: 1.228.1
|
||||||
generationVersion: 2.291.0
|
generationVersion: 2.292.0
|
||||||
releaseVersion: 0.8.0
|
releaseVersion: 0.9.0
|
||||||
configChecksum: cf2b262b65e980e20f7b8d5bac0073c9
|
configChecksum: 099f930233140a9803ac3954f0314d49
|
||||||
repoURL: https://github.com/LukeHagar/plexterraform.git
|
repoURL: https://github.com/LukeHagar/plexterraform.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
published: true
|
published: true
|
||||||
@@ -16,6 +16,7 @@ features:
|
|||||||
core: 3.12.1
|
core: 3.12.1
|
||||||
globalSecurity: 2.81.6
|
globalSecurity: 2.81.6
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
|
globals: 2.82.1
|
||||||
methodServerURLs: 2.82.1
|
methodServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.1
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: false
|
oAuth2ClientCredentialsEnabled: false
|
||||||
terraform:
|
terraform:
|
||||||
version: 0.8.0
|
version: 0.9.0
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
imports:
|
imports:
|
||||||
option: openapi
|
option: openapi
|
||||||
|
|||||||
40
README.md
40
README.md
@@ -61,7 +61,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,6 +99,44 @@ TF_REATTACH_PROVIDERS=... terraform apply
|
|||||||
|
|
||||||
<!-- End Available Resources and Operations [operations] -->
|
<!-- End Available Resources and Operations [operations] -->
|
||||||
|
|
||||||
|
<!-- Start Global Parameters [global-parameters] -->
|
||||||
|
## Global Parameters
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
### Available Globals
|
||||||
|
|
||||||
|
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
|
||||||
|
|
||||||
|
| Name | Type | Required | Description |
|
||||||
|
| ---- | ---- |:--------:| ----------- |
|
||||||
|
| XPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
|
||||||
|
This is used to track the client application and its usage
|
||||||
|
(UUID, serial number, or other number unique per device)
|
||||||
|
|
|
||||||
|
|
||||||
|
|
||||||
|
### Testing the provider locally
|
||||||
|
|
||||||
|
Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.
|
||||||
|
|
||||||
|
This also allows for debuggers (e.g. delve) to be attached to the provider.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go run main.go --debug
|
||||||
|
# Copy the TF_REATTACH_PROVIDERS env var
|
||||||
|
# In a new terminal
|
||||||
|
cd examples/your-example
|
||||||
|
TF_REATTACH_PROVIDERS=... terraform init
|
||||||
|
TF_REATTACH_PROVIDERS=... terraform apply
|
||||||
|
```
|
||||||
|
<!-- End Global Parameters [global-parameters] -->
|
||||||
|
|
||||||
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
||||||
|
|
||||||
Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.
|
Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.
|
||||||
|
|||||||
10
RELEASES.md
10
RELEASES.md
@@ -150,4 +150,12 @@ Based on:
|
|||||||
- OpenAPI Doc
|
- OpenAPI Doc
|
||||||
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
|
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
|
||||||
### Generated
|
### Generated
|
||||||
- [terraform v0.8.0] .
|
- [terraform v0.8.0] .
|
||||||
|
|
||||||
|
## 2024-03-29 16:36:48
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.228.1 (2.292.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [terraform v0.9.0] .
|
||||||
@@ -17,7 +17,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ func (s *Activities) CancelServerActivities(ctx context.Context, request operati
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/activities/{activityUUID}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Authentication) GetTransientToken(ctx context.Context, request operatio
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, req
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ func (s *Butler) StartTask(ctx context.Context, request operations.StartTaskRequ
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -417,7 +417,7 @@ func (s *Butler) StopTask(ctx context.Context, request operations.StopTaskReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/butler/{taskName}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, request operations.GetGlobalHu
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, request operations.GetLibrary
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/hubs/sections/{sectionId}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/hubs/sections/{sectionId}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, request operations.GetLibrary
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Library) GetFileHash(ctx context.Context, request operations.GetFileHas
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ func (s *Library) GetLibrary(ctx context.Context, request operations.GetLibraryR
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ func (s *Library) GetLibrary(ctx context.Context, request operations.GetLibraryR
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,7 +478,7 @@ func (s *Library) DeleteLibrary(ctx context.Context, request operations.DeleteLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -587,7 +587,7 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/{tag}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/{tag}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -674,7 +674,7 @@ func (s *Library) RefreshLibrary(ctx context.Context, request operations.Refresh
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/refresh", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/refresh", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -781,7 +781,7 @@ func (s *Library) SearchLibrary(ctx context.Context, request operations.SearchLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/search", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/search", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -793,7 +793,7 @@ func (s *Library) SearchLibrary(ctx context.Context, request operations.SearchLi
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -872,7 +872,7 @@ func (s *Library) GetMetadata(ctx context.Context, request operations.GetMetadat
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -972,7 +972,7 @@ func (s *Library) GetMetadataChildren(ctx context.Context, request operations.Ge
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/children", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/metadata/{ratingKey}/children", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Log) LogLine(ctx context.Context, request operations.LogLineRequest) (*
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Media) MarkPlayed(ctx context.Context, request operations.MarkPlayedReq
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ func (s *Media) MarkUnplayed(ctx context.Context, request operations.MarkUnplaye
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, request operations.Updat
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type GetPinRequest struct {
|
|||||||
// This is used to track the client application and its usage
|
// This is used to track the client application and its usage
|
||||||
// (UUID, serial number, or other number unique per device)
|
// (UUID, serial number, or other number unique per device)
|
||||||
//
|
//
|
||||||
XPlexClientIdentifier string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
|
XPlexClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g GetPinRequest) MarshalJSON() ([]byte, error) {
|
func (g GetPinRequest) MarshalJSON() ([]byte, error) {
|
||||||
@@ -43,9 +43,9 @@ func (o *GetPinRequest) GetStrong() *bool {
|
|||||||
return o.Strong
|
return o.Strong
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetPinRequest) GetXPlexClientIdentifier() string {
|
func (o *GetPinRequest) GetXPlexClientIdentifier() *string {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return ""
|
return nil
|
||||||
}
|
}
|
||||||
return o.XPlexClientIdentifier
|
return o.XPlexClientIdentifier
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type GetTokenRequest struct {
|
|||||||
// This is used to track the client application and its usage
|
// This is used to track the client application and its usage
|
||||||
// (UUID, serial number, or other number unique per device)
|
// (UUID, serial number, or other number unique per device)
|
||||||
//
|
//
|
||||||
XPlexClientIdentifier string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
|
XPlexClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetTokenRequest) GetPinID() string {
|
func (o *GetTokenRequest) GetPinID() string {
|
||||||
@@ -27,9 +27,9 @@ func (o *GetTokenRequest) GetPinID() string {
|
|||||||
return o.PinID
|
return o.PinID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetTokenRequest) GetXPlexClientIdentifier() string {
|
func (o *GetTokenRequest) GetXPlexClientIdentifier() *string {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return ""
|
return nil
|
||||||
}
|
}
|
||||||
return o.XPlexClientIdentifier
|
return o.XPlexClientIdentifier
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ func (s *Playlists) GetPlaylists(ctx context.Context, request operations.GetPlay
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ func (s *Playlists) GetPlaylist(ctx context.Context, request operations.GetPlayl
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -351,7 +351,7 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, request operations.Delet
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -441,7 +441,7 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, request operations.Updat
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -453,7 +453,7 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, request operations.Updat
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, request operations.
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -550,7 +550,7 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, request operations.
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -642,7 +642,7 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, request operation
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -733,7 +733,7 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/playlists/{playlistID}/items", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -745,7 +745,7 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -849,7 +849,7 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, request operations.Uploa
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
utils.PopulateHeaders(ctx, req, request, nil)
|
utils.PopulateHeaders(ctx, req, request, s.sdkConfiguration.Globals)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ func (s *Plex) GetToken(ctx context.Context, request operations.GetTokenRequest,
|
|||||||
baseURL = *o.ServerURL
|
baseURL = *o.ServerURL
|
||||||
}
|
}
|
||||||
|
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/pins/{pinID}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/pins/{pinID}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@ func (s *Plex) GetToken(ctx context.Context, request operations.GetTokenRequest,
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
utils.PopulateHeaders(ctx, req, request, nil)
|
utils.PopulateHeaders(ctx, req, request, s.sdkConfiguration.Globals)
|
||||||
|
|
||||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ type sdkConfiguration struct {
|
|||||||
SDKVersion string
|
SDKVersion string
|
||||||
GenVersion string
|
GenVersion string
|
||||||
UserAgent string
|
UserAgent string
|
||||||
|
Globals map[string]map[string]map[string]interface{}
|
||||||
RetryConfig *utils.RetryConfig
|
RetryConfig *utils.RetryConfig
|
||||||
Hooks *hooks.Hooks
|
Hooks *hooks.Hooks
|
||||||
}
|
}
|
||||||
@@ -254,6 +255,17 @@ func WithSecuritySource(security func(context.Context) (shared.Security, error))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithXPlexClientIdentifier allows setting the XPlexClientIdentifier parameter for all supported operations
|
||||||
|
func WithXPlexClientIdentifier(xPlexClientIdentifier string) SDKOption {
|
||||||
|
return func(sdk *PlexAPI) {
|
||||||
|
if _, ok := sdk.sdkConfiguration.Globals["parameters"]["header"]; !ok {
|
||||||
|
sdk.sdkConfiguration.Globals["parameters"]["header"] = map[string]interface{}{}
|
||||||
|
}
|
||||||
|
|
||||||
|
sdk.sdkConfiguration.Globals["parameters"]["header"]["XPlexClientIdentifier"] = xPlexClientIdentifier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption {
|
func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption {
|
||||||
return func(sdk *PlexAPI) {
|
return func(sdk *PlexAPI) {
|
||||||
sdk.sdkConfiguration.RetryConfig = &retryConfig
|
sdk.sdkConfiguration.RetryConfig = &retryConfig
|
||||||
@@ -267,8 +279,11 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.0.1",
|
SDKVersion: "0.0.1",
|
||||||
GenVersion: "2.291.0",
|
GenVersion: "2.292.0",
|
||||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.291.0 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
UserAgent: "speakeasy-sdk/go 0.0.1 2.292.0 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
||||||
|
Globals: map[string]map[string]map[string]interface{}{
|
||||||
|
"parameters": {},
|
||||||
|
},
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ func (s *Search) PerformSearch(ctx context.Context, request operations.PerformSe
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, request operations.Perf
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ func (s *Search) GetSearchResults(ctx context.Context, request operations.GetSea
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, request operations.
|
|||||||
}
|
}
|
||||||
|
|
||||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/transcode/sessions/{sessionKey}", request, nil)
|
opURL, err := utils.GenerateURL(ctx, baseURL, "/transcode/sessions/{sessionKey}", request, s.sdkConfiguration.Globals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Statistics) GetStatistics(ctx context.Context, request operations.GetSt
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ func (s *Updater) CheckForUpdates(ctx context.Context, request operations.CheckF
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ func (s *Updater) ApplyUpdates(ctx context.Context, request operations.ApplyUpda
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
|
|||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, s.sdkConfiguration.Globals); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user