PlexDevice¶
-
class
PlexDevice
(client, baseuri, token, data)¶ Represents a connected device. You can retrieve information and send commands to the device. PlexDevice is an instance of PlexContainer which allows browsing the device’s contents.
Creates a new PlexDevice. Generally you wouldn’t use this directly, instead get a device from PlexAccount.getResource or call PlexDevice.connect.
Arguments: - client (PlexClient) – the client used to access the device.
- baseuri (URL) – the URI to connect to the device.
- token (String) – the authentication used to access this device.
- data (Object) – data about the device.
-
PlexDevice.
connect
(client, baseuri, token)¶ Attempts to connect to a Plex device.
Arguments: - client – the PlexClient to use to connect.
- baseuri (URL) – the URI to connect to.
- token (String) – the authentication token to use.
Returns: Promise.<PlexDevice> – the connected device on success.
-
PlexDevice.
id
¶ Returns the device ID.