ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.228.1

This commit is contained in:
speakeasybot
2024-03-29 16:37:36 +00:00
parent ea30334a95
commit 32a5beaae6
41 changed files with 243 additions and 92 deletions

View File

@@ -33,6 +33,7 @@ import (
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("<value>"),
)
ctx := context.Background()
@@ -184,6 +185,7 @@ import (
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("<value>"),
)
ctx := context.Background()
@@ -234,6 +236,7 @@ func main() {
s := plexgo.New(
plexgo.WithServerIndex(0),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("<value>"),
)
ctx := context.Background()
@@ -272,6 +275,7 @@ func main() {
s := plexgo.New(
plexgo.WithServerURL("{protocol}://{ip}:{port}"),
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("<value>"),
)
ctx := context.Background()
@@ -299,14 +303,16 @@ import (
)
func main() {
s := plexgo.New()
var xPlexClientIdentifier string = "<value>"
s := plexgo.New(
plexgo.WithXPlexClientIdentifier("<value>"),
)
var strong *bool = plexgo.Bool(false)
var xPlexClientIdentifier *string = plexgo.String("<value>")
ctx := context.Background()
res, err := s.Plex.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), xPlexClientIdentifier, strong)
res, err := s.Plex.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), strong, xPlexClientIdentifier)
if err != nil {
log.Fatal(err)
}
@@ -371,6 +377,7 @@ import (
func main() {
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
plexgo.WithXPlexClientIdentifier("<value>"),
)
ctx := context.Background()
@@ -412,6 +419,59 @@ d6 := types.MustDateFromString("2019-01-01") // returns types.Date and panics on
```
<!-- End Special Types [types] -->
<!-- Start Global Parameters [global-parameters] -->
## Global Parameters
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `X-Plex-Client-Identifier` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetPin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
### Available Globals
The following global parameter is available. The required parameter must be set when you initialize the SDK client.
| Name | Type | Required | Description |
| ---- | ---- |:--------:| ----------- |
| XPlexClientIdentifier | string | ✔️ | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
|
### Example
```go
package main
import (
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
s := plexgo.New(
plexgo.WithXPlexClientIdentifier("<value>"),
)
var strong *bool = plexgo.Bool(false)
var xPlexClientIdentifier *string = plexgo.String("<value>")
ctx := context.Background()
res, err := s.Plex.GetPin(ctx, strong, xPlexClientIdentifier)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
```
<!-- End Global Parameters [global-parameters] -->
<!-- Placeholder for Future Speakeasy SDK Sections -->
# Development