PlexCalls class

A utility class that provides simplified methods for making API calls using the underlying PlexNetworking functionality.

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}) 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}) Future<PlexApiResult>
Makes a GET request to the specified endpoint
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}) Future<PlexApiResult>
Makes a POST request to the specified endpoint
put(String endpoint, {dynamic body, Map<String, dynamic>? queryParams, Map<String, String>? headers, Map<String, dynamic>? formData, bool useFullUrl = false}) 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}) 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 PlexCalls
Singleton instance of PlexCalls
final