mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea30334a95 | ||
|
|
f3eb760757 | ||
|
|
683823eab9 | ||
|
|
6942d6b905 | ||
|
|
1a7051235f | ||
|
|
68fedfa8fc |
@@ -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.204.1
|
speakeasyVersion: 1.227.0
|
||||||
generationVersion: 2.279.1
|
generationVersion: 2.291.0
|
||||||
releaseVersion: 0.5.0
|
releaseVersion: 0.5.3
|
||||||
configChecksum: 1284e3a3727181c2abda0301a52757ec
|
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,10 +14,10 @@ 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.8
|
globalSecurity: 2.82.9
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.2
|
||||||
methodServerURLs: 2.82.1
|
methodServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.1
|
||||||
responseFormat: 0.1.0
|
responseFormat: 0.1.0
|
||||||
|
|||||||
30
RELEASES.md
30
RELEASES.md
@@ -169,3 +169,33 @@ Based on:
|
|||||||
- [go v0.5.0] .
|
- [go v0.5.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.5.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.0 - .
|
- [Go v0.5.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.0 - .
|
||||||
|
|
||||||
|
## 2024-03-13 00:44:38
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.5.1] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.5.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.5.1 - .
|
||||||
|
|
||||||
|
## 2024-03-20 00:43:42
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.213.0 (2.283.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.5.2] .
|
||||||
|
### Releases
|
||||||
|
- [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.0
|
version: 0.5.3
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
clientServerStatusCodesAsErrors: true
|
clientServerStatusCodesAsErrors: true
|
||||||
flattenGlobalSecurity: true
|
flattenGlobalSecurity: true
|
||||||
|
|||||||
@@ -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.0",
|
SDKVersion: "0.5.3",
|
||||||
GenVersion: "2.279.1",
|
GenVersion: "2.291.0",
|
||||||
UserAgent: "speakeasy-sdk/go 0.5.0 2.279.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