PlexApi class

Application-level API client. Provides simplified methods for making API calls using the underlying PlexNetworking functionality, returning flat PlexApiResult.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allowBadHttpsCertificates() → void
Allows bad HTTPS certificates for development purposes
delete(String endpoint, {Map<String, dynamic>? queryParams, Map<String, String>? headers, dynamic body, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a DELETE request to the specified endpoint
downloadFile(String url, {required String filename, required dynamic onProgressUpdate(int downloaded, double? percentage, File? file)}) Future<void>
Downloads a file from the specified URL
get(String endpoint, {Map<String, dynamic>? queryParams, Map<String, String>? headers, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a GET request to the specified endpoint
getTyped<T>(String endpoint, {required T fromJson(Map<String, dynamic>), Map<String, dynamic>? queryParams, Map<String, String>? headers, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a GET request with type-safe response parsing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String endpoint, {dynamic body, Map<String, dynamic>? queryParams, Map<String, String>? headers, Map<String, dynamic>? formData, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a POST request to the specified endpoint
postTyped<T>(String endpoint, {required T fromJson(Map<String, dynamic>), dynamic body, Map<String, dynamic>? queryParams, Map<String, String>? headers, Map<String, dynamic>? formData, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a POST request with type-safe response parsing.
put(String endpoint, {dynamic body, Map<String, dynamic>? queryParams, Map<String, String>? headers, Map<String, dynamic>? formData, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a PUT request to the specified endpoint (used for updates)
setBaseUrl(String baseUrl) → void
Sets the base URL for all API calls
setHeadersCallback(Future<Map<String, String>> headersCallback()) → void
Sets a callback that will be called before each request to add headers
toString() String
A string representation of this object.
inherited
uploadFiles(String endpoint, {required Map<String, String> formData, required Map<String, File> files, Map<String, dynamic>? queryParams, Map<String, String>? headers, bool useFullUrl = false, Duration? timeout, PlexCancelToken? cancelToken}) Future<PlexApiResult>
Makes a multipart POST request to the specified endpoint for uploading files

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance PlexApi
Singleton instance of PlexApi
final