Authorizations
Response
200 - application/json
package main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Devices.DiscoverDevices(ctx)
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithDevice != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Device": [
{
"ChannelMapping": [
{
"channelKey": "<string>",
"deviceIdentifier": "<string>",
"enabled": "<string>",
"lineupIdentifier": "<string>"
}
],
"key": "<string>",
"lastSeenAt": 123,
"make": "<string>",
"model": "<string>",
"modelNumber": "<string>",
"protocol": "<string>",
"sources": "<string>",
"state": "<string>",
"status": "<string>",
"tuners": "<string>",
"uri": "<string>",
"uuid": "<string>"
}
]
}
}Tell grabbers to discover devices
package main
import(
"context"
"github.com/LukeHagar/plexgo"
"log"
)
func main() {
ctx := context.Background()
s := plexgo.New(
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Devices.DiscoverDevices(ctx)
if err != nil {
log.Fatal(err)
}
if res.MediaContainerWithDevice != nil {
// handle response
}
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Device": [
{
"ChannelMapping": [
{
"channelKey": "<string>",
"deviceIdentifier": "<string>",
"enabled": "<string>",
"lineupIdentifier": "<string>"
}
],
"key": "<string>",
"lastSeenAt": 123,
"make": "<string>",
"model": "<string>",
"modelNumber": "<string>",
"protocol": "<string>",
"sources": "<string>",
"state": "<string>",
"status": "<string>",
"tuners": "<string>",
"uri": "<string>",
"uuid": "<string>"
}
]
}
}Show child attributes
Was this page helpful?