diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8c3854a..dd66991 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -4,9 +4,9 @@ management: docChecksum: 94439465ae5d544f0e52b00719af05ee docVersion: 0.0.3 speakeasyVersion: internal - generationVersion: 2.239.4 - releaseVersion: 0.2.0 - configChecksum: cab54fc8ee2784bf822df0198252c4f5 + generationVersion: 2.245.1 + releaseVersion: 0.2.1 + configChecksum: 0c6f5f0bce6af6f3bd99f99ce9584d7e repoURL: https://github.com/LukeHagar/plexgo.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexgo @@ -16,7 +16,7 @@ features: constsAndDefaults: 0.1.2 core: 3.3.1 flattening: 2.81.1 - globalSecurity: 2.82.4 + globalSecurity: 2.82.5 globalServerURLs: 2.82.1 methodServerURLs: 2.82.1 nameOverrides: 2.81.1 diff --git a/RELEASES.md b/RELEASES.md index b60e5ff..6610f2a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -98,4 +98,14 @@ Based on: ### Generated - [go v0.2.0] . ### Releases -- [Go v0.2.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.2.0 - . \ No newline at end of file +- [Go v0.2.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.2.0 - . + +## 2024-02-01 00:46:46 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.161.0 (2.245.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.2.1] . +### Releases +- [Go v0.2.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.2.1 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 0dc695a..791e8a5 100644 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: fixes: nameResolutionDec2023: false go: - version: 0.2.0 + version: 0.2.1 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/plexapi.go b/plexapi.go index 2eb772a..acc4abd 100644 --- a/plexapi.go +++ b/plexapi.go @@ -240,6 +240,15 @@ func WithSecurity(accessToken string) SDKOption { } } +// WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication +func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption { + return func(sdk *PlexAPI) { + sdk.sdkConfiguration.Security = func(ctx context.Context) (interface{}, error) { + return security(ctx) + } + } +} + func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption { return func(sdk *PlexAPI) { sdk.sdkConfiguration.RetryConfig = &retryConfig @@ -252,9 +261,9 @@ func New(opts ...SDKOption) *PlexAPI { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.3", - SDKVersion: "0.2.0", - GenVersion: "2.239.4", - UserAgent: "speakeasy-sdk/go 0.2.0 2.239.4 0.0.3 github.com/LukeHagar/plexgo", + SDKVersion: "0.2.1", + GenVersion: "2.245.1", + UserAgent: "speakeasy-sdk/go 0.2.1 2.245.1 0.0.3 github.com/LukeHagar/plexgo", ServerDefaults: []map[string]string{ { "protocol": "http",