mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea30334a95 | ||
|
|
f3eb760757 |
@@ -3,10 +3,10 @@ id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
||||
management:
|
||||
docChecksum: e34dac84738ebf2d447ea2b9055a6eeb
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.213.0
|
||||
generationVersion: 2.283.1
|
||||
releaseVersion: 0.5.2
|
||||
configChecksum: 180ba7e4c10a508e14fd2d39e146af61
|
||||
speakeasyVersion: 1.227.0
|
||||
generationVersion: 2.291.0
|
||||
releaseVersion: 0.5.3
|
||||
configChecksum: 518d95abe21d1a64d11134ba40435fa7
|
||||
repoURL: https://github.com/LukeHagar/plexgo.git
|
||||
repoSubDirectory: .
|
||||
installationURL: https://github.com/LukeHagar/plexgo
|
||||
@@ -14,7 +14,7 @@ management:
|
||||
features:
|
||||
go:
|
||||
constsAndDefaults: 0.1.4
|
||||
core: 3.4.4
|
||||
core: 3.4.5
|
||||
flattening: 2.81.1
|
||||
globalSecurity: 2.82.9
|
||||
globalServerURLs: 2.82.2
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -188,4 +188,14 @@ Based on:
|
||||
### Generated
|
||||
- [go v0.5.2] .
|
||||
### 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:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
go:
|
||||
version: 0.5.2
|
||||
version: 0.5.3
|
||||
additionalDependencies: {}
|
||||
clientServerStatusCodesAsErrors: true
|
||||
flattenGlobalSecurity: true
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"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)
|
||||
headerParamsValType := reflect.ValueOf(headers)
|
||||
|
||||
@@ -18,6 +18,8 @@ func PopulateHeaders(ctx context.Context, req *http.Request, headers interface{}
|
||||
fieldType := headerParamsStructType.Field(i)
|
||||
valType := headerParamsValType.Field(i)
|
||||
|
||||
valType = populateFromGlobals(fieldType, valType, "header", globals)
|
||||
|
||||
tag := parseParamTag(headerParamTagKey, fieldType, "simple", false)
|
||||
if tag == nil {
|
||||
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("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 {
|
||||
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("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)
|
||||
if err != nil {
|
||||
|
||||
@@ -267,9 +267,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
||||
sdkConfiguration: sdkConfiguration{
|
||||
Language: "go",
|
||||
OpenAPIDocVersion: "0.0.3",
|
||||
SDKVersion: "0.5.2",
|
||||
GenVersion: "2.283.1",
|
||||
UserAgent: "speakeasy-sdk/go 0.5.2 2.283.1 0.0.3 github.com/LukeHagar/plexgo",
|
||||
SDKVersion: "0.5.3",
|
||||
GenVersion: "2.291.0",
|
||||
UserAgent: "speakeasy-sdk/go 0.5.3 2.291.0 0.0.3 github.com/LukeHagar/plexgo",
|
||||
ServerDefaults: []map[string]string{
|
||||
{
|
||||
"protocol": "http",
|
||||
|
||||
Reference in New Issue
Block a user