CardTextUtils

Utility functions for accessing card text properties. Kotlin/JS mangles property names, so use these functions to access card data.

Usage:

import { CardTextUtils } from '@devmugi/scryfall-api';

const name = CardTextUtils.getName(card);

Functions

Link copied to clipboard
fun getCmc(card: Card): Double

Gets the converted mana cost / mana value

Link copied to clipboard
fun getManaCost(card: Card): String?

Gets the mana cost

Link copied to clipboard
fun getName(card: Card): String

Gets the card name

Link copied to clipboard
fun getOracleText(card: Card): String?

Gets the oracle text

Link copied to clipboard
fun getPower(card: Card): String?

Gets the power (for creatures)

Link copied to clipboard
fun getToughness(card: Card): String?

Gets the toughness (for creatures)

Link copied to clipboard
fun getTypeLine(card: Card): String?

Gets the card type line