mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.227.0
This commit is contained in:
@@ -3,10 +3,10 @@ id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
|||||||
management:
|
management:
|
||||||
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
|
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.213.0
|
speakeasyVersion: 1.227.0
|
||||||
generationVersion: 2.283.1
|
generationVersion: 2.291.0
|
||||||
releaseVersion: 0.5.2
|
releaseVersion: 0.5.3
|
||||||
configChecksum: 180ba7e4c10a508e14fd2d39e146af61
|
configChecksum: 518d95abe21d1a64d11134ba40435fa7
|
||||||
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,7 +14,7 @@ management:
|
|||||||
features:
|
features:
|
||||||
go:
|
go:
|
||||||
constsAndDefaults: 0.1.4
|
constsAndDefaults: 0.1.4
|
||||||
core: 3.4.4
|
core: 3.4.5
|
||||||
flattening: 2.81.1
|
flattening: 2.81.1
|
||||||
globalSecurity: 2.82.9
|
globalSecurity: 2.82.9
|
||||||
globalServerURLs: 2.82.2
|
globalServerURLs: 2.82.2
|
||||||
|
|||||||
10
RELEASES.md
10
RELEASES.md
@@ -189,3 +189,13 @@ Based on:
|
|||||||
- [go v0.5.2] .
|
- [go v0.5.2] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.5.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.2 - .
|
- [Go v0.5.2] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.2 - .
|
||||||
|
|
||||||
|
## 2024-03-27 00:44:06
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.227.0 (2.291.0) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.5.3] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.5.3] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.3 - .
|
||||||
2
gen.yaml
2
gen.yaml
@@ -12,7 +12,7 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: false
|
oAuth2ClientCredentialsEnabled: false
|
||||||
go:
|
go:
|
||||||
version: 0.5.2
|
version: 0.5.3
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
module github.com/LukeHagar/plexgo
|
module github.com/LukeHagar/plexgo
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cenkalti/backoff/v4 v4.2.0
|
github.com/cenkalti/backoff/v4 v4.2.0
|
||||||
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
|
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
|
||||||
|
github.com/spyzhov/ajson v0.8.0
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}) {
|
func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}, globals map[string]map[string]map[string]interface{}) {
|
||||||
headerParamsStructType := reflect.TypeOf(headers)
|
headerParamsStructType := reflect.TypeOf(headers)
|
||||||
headerParamsValType := reflect.ValueOf(headers)
|
headerParamsValType := reflect.ValueOf(headers)
|
||||||
|
|
||||||
@@ -18,6 +18,8 @@ func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}
|
|||||||
fieldType := headerParamsStructType.Field(i)
|
fieldType := headerParamsStructType.Field(i)
|
||||||
valType := headerParamsValType.Field(i)
|
valType := headerParamsValType.Field(i)
|
||||||
|
|
||||||
|
valType = populateFromGlobals(fieldType, valType, "header", globals)
|
||||||
|
|
||||||
tag := parseParamTag(headerParamTagKey, fieldType, "simple", false)
|
tag := parseParamTag(headerParamTagKey, fieldType, "simple", false)
|
||||||
if tag == nil {
|
if tag == nil {
|
||||||
continue
|
continue
|
||||||
|
|||||||
4
plex.go
4
plex.go
@@ -68,7 +68,7 @@ func (s *Plex) GetPin(ctx context.Context, xPlexClientIdentifier string, strong
|
|||||||
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)
|
utils.PopulateHeaders(ctx, req, request, nil)
|
||||||
|
|
||||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||||
@@ -193,7 +193,7 @@ func (s *Plex) GetToken(ctx context.Context, pinID string, xPlexClientIdentifier
|
|||||||
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)
|
utils.PopulateHeaders(ctx, req, request, nil)
|
||||||
|
|
||||||
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 {
|
||||||
|
|||||||
@@ -267,9 +267,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.5.2",
|
SDKVersion: "0.5.3",
|
||||||
GenVersion: "2.283.1",
|
GenVersion: "2.291.0",
|
||||||
UserAgent: "speakeasy-sdk/go 0.5.2 2.283.1 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.5.3 2.291.0 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
|||||||
Reference in New Issue
Block a user