mixins/utils library

Functions

decodeEscapes(String input, {bool replaceQuot = false}) String
Decodes Unicode escapes.
getDatestamp() int
Returns the number of days since January 1, 1970.
htmlToTxt(String htmlText) String
Sanitize tags from HTML.
prepareLikeEndpoint(dynamic rating) String
Returns endpoint according to rating.
prepareOrderParams(LibraryOrderType order) String
Returns request params belonging to a specific sorting order.
validateOrderParameter(LibraryOrderType? order) → void
Validate the provided order, if any.
validateWriteResponse(JsonMap response) → void
Check that YTM performed a write request instead of answering with a dialog. A gated request returns HTTP 200 with only a showEngagementPanelEndpoint action carrying the original request, for the web client to replay once the user has dealt with the dialog.

Typedefs

LibraryOrderType = String
Literal a_to_z, z_to_a, or recently_added.