From cd28f2ff22373853ddec2d856f1ca723c3d86f59 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 24 Feb 2024 01:01:30 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.4 --- .speakeasy/gen.lock | 14 +++++++------- README.md | 2 +- RELEASES.md | 10 +++++++++- docs/index.md | 2 +- examples/provider/provider.tf | 2 +- gen.yaml | 4 +++- internal/sdk/{security.go => authentication.go} | 12 ++++++------ internal/sdk/plex.go | 4 ++-- internal/sdk/sdk.go | 12 ++++++------ 9 files changed, 36 insertions(+), 26 deletions(-) rename internal/sdk/{security.go => authentication.go} (89%) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 49dced9..88e25c8 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,20 +1,20 @@ lockVersion: 2.0.0 id: e742591b-391d-4f4e-8484-d01a093b32ec management: - docChecksum: 278d186496d83d5830ba4870f8cad39d + docChecksum: e34dac84738ebf2d447ea2b9055a6eeb docVersion: 0.0.3 speakeasyVersion: internal - generationVersion: 2.269.0 - releaseVersion: 0.6.0 - configChecksum: 8b5014a8db27030d0bae86f162af255d + generationVersion: 2.272.4 + releaseVersion: 0.6.1 + configChecksum: e752e44e3eb091bcb6d52058f838ee2f repoURL: https://github.com/LukeHagar/plexterraform.git repoSubDirectory: . published: true features: terraform: constsAndDefaults: 0.1.3 - core: 3.10.0 - globalSecurity: 2.81.3 + core: 3.10.2 + globalSecurity: 2.81.4 globalServerURLs: 2.82.1 methodServerURLs: 2.82.1 nameOverrides: 2.81.1 @@ -30,7 +30,7 @@ generatedFiles: - internal/sdk/log.go - internal/sdk/plex.go - internal/sdk/playlists.go - - internal/sdk/security.go + - internal/sdk/authentication.go - internal/sdk/statistics.go - internal/sdk/sessions.go - internal/sdk/updater.go diff --git a/README.md b/README.md index 31859c2..09f84e7 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.6.0" + version = "0.6.1" } } } diff --git a/RELEASES.md b/RELEASES.md index 27801b4..9f35ec4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -118,4 +118,12 @@ Based on: - OpenAPI Doc 0.0.3 - Speakeasy CLI 1.193.0 (2.269.0) https://github.com/speakeasy-api/speakeasy ### Generated -- [terraform v0.6.0] . \ No newline at end of file +- [terraform v0.6.0] . + +## 2024-02-24 01:00:54 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.193.4 (2.272.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [terraform v0.6.1] . \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index d06afee..3c53255 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.6.0" + version = "0.6.1" } } } diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index d52c8d8..0c3dae6 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { PlexAPI = { source = "LukeHagar/PlexAPI" - version = "0.6.0" + version = "0.6.1" } } } diff --git a/gen.yaml b/gen.yaml index f461f4c..97d0d53 100644 --- a/gen.yaml +++ b/gen.yaml @@ -9,8 +9,10 @@ generation: nameResolutionDec2023: false parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false + auth: + oAuth2ClientCredentialsEnabled: false terraform: - version: 0.6.0 + version: 0.6.1 author: LukeHagar imports: option: openapi diff --git a/internal/sdk/security.go b/internal/sdk/authentication.go similarity index 89% rename from internal/sdk/security.go rename to internal/sdk/authentication.go index c8f55fc..9c74f6b 100644 --- a/internal/sdk/security.go +++ b/internal/sdk/authentication.go @@ -14,20 +14,20 @@ import ( "strings" ) -// Security - API Calls against Security for Plex Media Server -type Security struct { +// Authentication - API Calls regarding authentication for Plex Media Server +type Authentication struct { sdkConfiguration sdkConfiguration } -func newSecurity(sdkConfig sdkConfiguration) *Security { - return &Security{ +func newAuthentication(sdkConfig sdkConfiguration) *Authentication { + return &Authentication{ sdkConfiguration: sdkConfig, } } // GetTransientToken - Get a Transient Token. // This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. -func (s *Security) GetTransientToken(ctx context.Context, request operations.GetTransientTokenRequest) (*operations.GetTransientTokenResponse, error) { +func (s *Authentication) GetTransientToken(ctx context.Context, request operations.GetTransientTokenRequest) (*operations.GetTransientTokenResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/security/token" @@ -90,7 +90,7 @@ func (s *Security) GetTransientToken(ctx context.Context, request operations.Get // GetSourceConnectionInformation - Get Source Connection Information // If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. // Note: requires Plex Media Server >= 1.15.4. -func (s *Security) GetSourceConnectionInformation(ctx context.Context, request operations.GetSourceConnectionInformationRequest) (*operations.GetSourceConnectionInformationResponse, error) { +func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, request operations.GetSourceConnectionInformationRequest) (*operations.GetSourceConnectionInformationResponse, error) { baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) url := strings.TrimSuffix(baseURL, "/") + "/security/resources" diff --git a/internal/sdk/plex.go b/internal/sdk/plex.go index 1de4d69..aa9140e 100644 --- a/internal/sdk/plex.go +++ b/internal/sdk/plex.go @@ -58,7 +58,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt return nil, fmt.Errorf("error populating query params: %w", err) } - client := s.sdkConfiguration.SecurityClient + client := s.sdkConfiguration.DefaultClient httpRes, err := client.Do(req) if err != nil { @@ -144,7 +144,7 @@ func (s *Plex) GetToken(ctx context.Context, request operations.GetTokenRequest, utils.PopulateHeaders(ctx, req, request) - client := s.sdkConfiguration.SecurityClient + client := s.sdkConfiguration.DefaultClient httpRes, err := client.Do(req) if err != nil { diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go index 6309d52..8e8e927 100644 --- a/internal/sdk/sdk.go +++ b/internal/sdk/sdk.go @@ -109,9 +109,9 @@ type PlexAPI struct { // This may cause the duration and number of items to change. // Playlists *Playlists - // API Calls against Security for Plex Media Server + // API Calls regarding authentication for Plex Media Server // - Security *Security + Authentication *Authentication // API Calls that perform operations with Plex Media Server Statistics // Statistics *Statistics @@ -265,9 +265,9 @@ func New(opts ...SDKOption) *PlexAPI { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.3", - SDKVersion: "0.6.0", - GenVersion: "2.269.0", - UserAgent: "speakeasy-sdk/go 0.6.0 2.269.0 0.0.3 PlexAPI", + SDKVersion: "0.6.1", + GenVersion: "2.272.4", + UserAgent: "speakeasy-sdk/go 0.6.1 2.272.4 0.0.3 PlexAPI", ServerDefaults: []map[string]string{ { "protocol": "http", @@ -315,7 +315,7 @@ func New(opts ...SDKOption) *PlexAPI { sdk.Playlists = newPlaylists(sdk.sdkConfiguration) - sdk.Security = newSecurity(sdk.sdkConfiguration) + sdk.Authentication = newAuthentication(sdk.sdkConfiguration) sdk.Statistics = newStatistics(sdk.sdkConfiguration)