PlexClient¶
-
class
PlexClient
(options)¶ PlexClient is the first class that any API callers must instantiate. It is responsible for holding details about the sort of device that is using the API. Different settings will cause Plex to respond differently, for example only certain product names will work for syncing.
An optional options argument can be passed to override various defaults for the settings which have the following defaults:
- product
- “plex-client”.
- version
- plex-client’s version.
- platform
- The current OS.
- platformVersion
- The current OS version.
- device
- The current OS.
- name
- The current hostname.
- uuid
- A unique identified for the client, generated from the hostname.
- provides
- An array of services the client provides.
- screenResolution
- “1920x1080”.
- screenDensity
- undefined.
Arguments: - options (Object) – override the default options.
-
PlexClient.
Android
(options)¶ Creates a new PlexClient but uses a set of defaults that makes it look like an Android client.
Arguments: - options (Object) – override options as described in the constructor.
-
PlexClient.
WebBrowser
(options)¶ Creates a new PlexClient but uses a set of defaults that makes it look like a web browser client.
Arguments: - options (Object) – override options as described in the constructor.