Skip to main content
GET
/
media
/
grabbers
/
devices
PlexGO
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.ListDevices(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>"
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Response

200 - application/json
MediaContainer
object