PlexResource class
One server entry from plex.tv/api/v2/resources.
connections is the list of candidate URIs to reach the server —
pick the best one with bestConnection.
Constructors
-
PlexResource({required String name, required String clientIdentifier, required String product, required String productVersion, required String platform, required bool owned, required bool home, required bool synced, required bool relay, required bool presence, required bool httpsRequired, required String accessToken, required List<
String> provides, required List<PlexServerConnection> connections, String? device, String? publicAddress}) -
Creates a resource record;
deviceandpublicAddressare optional.const -
PlexResource.fromJson(Map<
String, dynamic> json) -
Parses one resource entry from
plex.tv/api/v2/resources, including its nestedconnectionsarray.factory
Properties
- accessToken → String
-
Account-scoped access token to use when connecting to this resource.
final
- clientIdentifier → String
-
Stable per-install identifier (matches
X-Plex-Client-Identifier).final -
connections
→ List<
PlexServerConnection> -
Candidate URIs to reach the resource — pass through bestConnection
for the preferred one.
final
- device → String?
-
Optional device descriptor (model / form factor).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- home → bool
-
True when shared via Plex Home.
final
- httpsRequired → bool
-
True when the server requires HTTPS for non-local traffic.
final
- isServer → bool
-
Whether this resource is a Plex Media Server (vs. a player/client).
no setter
- name → String
-
Friendly display name of the resource (server or player).
final
- owned → bool
-
True when the resource is owned by the authenticated account.
final
- platform → String
-
Host platform, e.g.
Linux,macOS,iOS.final - presence → bool
-
True when the resource is currently online / presencing.
final
- product → String
-
Product name, e.g.
Plex Media ServerorPlex for iOS.final - productVersion → String
-
Product version string reported by the resource.
final
-
provides
→ List<
String> -
Capabilities advertised by the resource (
server,player,controller, …), split from Plex's comma-separated string.final - publicAddress → String?
-
Public (WAN) IP address last reported by the resource, if any.
final
- relay → bool
-
True when only reachable via Plex Relay (no direct path).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- synced → bool
-
True when this is a synced/cloud resource.
final
Methods
-
bestConnection(
) → PlexServerConnection? - Pick the most desirable connection URI in this order:
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited