mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-09 20:47:47 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.161.0
This commit is contained in:
@@ -74,5 +74,40 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Override Server URL Per-Operation
|
||||
|
||||
The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/LukeHagar/plexgo"
|
||||
"github.com/LukeHagar/plexgo/models/components"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := plexgo.New(
|
||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||
)
|
||||
|
||||
var xPlexClientIdentifier string = "string"
|
||||
|
||||
var strong *bool = false
|
||||
|
||||
ctx := context.Background()
|
||||
res, err := s.Plex.Tv.GetPin(ctx, operations.WithServerURL("https://plex.tv/api/v2"), xPlexClientIdentifier, strong)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if res.Object != nil {
|
||||
// handle response
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
{/* End Go Server Options */}
|
||||
|
||||
Reference in New Issue
Block a user