Skip to content

2. API Reference

Jared Van Valkengoed edited this page Oct 6, 2025 · 1 revision

initializeDeck(cards)

  • Description: Initializes the deck with a provided array of card objects.
  • Parameters:
    • cards (Array<Object>): Array of Tarot "cards", each with properties like name and meaning.
    • options (Object): Spread settings.
      • positions (Array): An array defining positions in the spread.
      • description (string, optional): Brief description of the spread.
  • Returns: The configured spread object.

addSpread(name, options)

  • Description: Adds a custom spread configuration.
  • Parameters:
    • name (string): Unique name for the spread.
    • options (Object): Spread settings.
      • positions (Array): An array defining positions in the spread.
      • description (string, optional): Brief description of the spread.
  • Returns: The configured spread object.

doReading(spreadName)

  • Description: Draws cards according to the specified spread.
  • Parameters:
    • spreadName (string): Name of the spread to use for the reading.
  • Returns: Array of objects with each position and corresponding drawn card.

shuffleDeck()

  • Description: Shuffles the deck in place.

removeSpread(name)

  • Description: Removes a spread by name.

getSpreadInfo(name)

  • Description: Retrieves information about a specific spread.

listSpreads()

  • Description: Lists all available custom spreads by name.

drawCards(count)

  • Description: Draws a specified number of cards from the deck.

getCurrentSpread()

  • Description: Retrieves the current spread from the most recent reading.

getDeckInfo()

  • Description: Retrieves information about the current deck, including the number of cards and card details.
Clone this wiki locally