TautulliUtilities class

TautulliUtilities gives access to static, functional operations. These are mainly used for the (de)serialization of received JSON data.

TautulliUtilities cannot be initialized, all available functions are available statically.

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

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

Static Methods

ensureBooleanFromJson(dynamic value) bool?
Ensures that the passed in value results in a boolean. Can handle integers, doubles, strings, or booleans. Any other types will return null.
ensureDoubleFromJson(dynamic value) double?
Ensures that the passed in value results in a double. Can handle integers, doubles, strings, or booleans. Any other types will return null.
ensureIntegerFromJson(dynamic value) int?
Ensures that the passed in value results in an integer. Can handle integers, doubles, strings, or booleans. Any other types will return null.
ensureIntegerListFromJson(dynamic value) List<int?>?
Ensures that the passed in value results in a List
ensureStringFromJson(dynamic value) String?
Ensures that the passed in value results in a string. Can handle integers, doubles, strings, or booleans. Any other types will return null.
ensureStringListFromJson(dynamic value) List<String?>?
Ensures that the passed in value results in a List
mediaTypeFromJson(String? type) TautulliMediaType?
Converts a string to a TautulliMediaType object.
mediaTypeToJson(TautulliMediaType? type) String?
Converts a TautulliMediaType object back to its string representation.
millisecondsDateTimeFromJson(dynamic value) DateTime?
Converts a String containing a unix/Epoch millisecond value to a DateTime object. Returns null on a poorly formatted string.
millisecondsDurationFromJson(dynamic value) Duration?
Converts a value of milliseconds to a Duration object.
secondsDurationFromJson(dynamic value) Duration?
Converts a value of seconds to a Duration object.
sectionTypeFromJson(String? type) TautulliSectionType?
Converts a string to a TautulliSectionType object.
sectionTypeToJson(TautulliSectionType? type) String?
Converts a TautulliSectionType object back to its string representation.
sessionLocationFromJson(String? location) TautulliSessionLocation?
Conerts a string to a TautulliSessionLocation object.
sessionLocationToJson(TautulliSessionLocation? location) String?
Converts a TautulliSessionLocation object back to its string representation.
sessionStateFromJson(String? state) TautulliSessionState?
Converts a string to a TautulliSessionState object.
sessionStateToJson(TautulliSessionState? state) String?
Converts a TautulliSessionState object back to its string representation.
stringToListStringFromJson(String? list, {String delimiter = ','}) List<String>?
Converts a string to a List<String>. The default delimiter is a comma ,.
transcodeDecisionFromJson(String? decision) TautulliTranscodeDecision?
Converts a string to a TautulliTranscodeDecision object.
transcodeDecisionToJson(TautulliTranscodeDecision? decision) String?
Converts a TautulliTranscodeDecision object back to its string representation.
userGroupFromJson(String? group) TautulliUserGroup?
Converts a string to a TautulliUserGroup object.
userGroupToJson(TautulliUserGroup? group) String?
Converts a TautulliUserGroup object back to its string representation.
watchedStatusFromJson(num? watched) TautulliWatchedStatus?
Converts a double to a TautulliWatchedStatus object.
watchedStatusToJson(TautulliWatchedStatus? watched) num?
Converts a TautulliWatchedStatus object back to its double representation.