parseMana

suspend fun parseMana(cost: String, format: String? = "json", pretty: Boolean? = false): ParsedManaCost

Parses a mana cost string into tokens and computes values like converted mana cost and colors. https://scryfall.com/docs/api/card-symbols/parse-mana

Parameters

cost
  • A mana cost string such as {2}{G}{U} or {G/U}.

format
  • The data format to return. This method only supports json.

pretty
  • If true, the returned JSON will be prettified. Avoid using for production code.