Package net.dzultra.jsa.symbology
Klasse Symbology
java.lang.Object
net.dzultra.jsa.symbology.Symbology
Provides access to the Scryfall symbology endpoints.
This class allows retrieval and parsing of card symbol definitions and
mana cost representations from the Scryfall API. It uses a
ScryfallClient for HTTP communication and Gson for
JSON deserialization.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected final ScryfallClientThe client used to perform HTTP requests.The API endpoint for symbology-related requests.protected com.google.gson.GsonTheGsoninstance used for JSON deserialization.Stores the last raw JSON response received from the API. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSymbology(ScryfallClient client) Constructs a newSymbologyinstance using the given client. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungRetrieves all card symbols from the Scryfall API.getManaCost(String manaCost) Parses a mana cost string into its structured representation.
-
Felddetails
-
client
The client used to perform HTTP requests. -
gson
protected com.google.gson.Gson gsonTheGsoninstance used for JSON deserialization. -
endpoint
The API endpoint for symbology-related requests. -
response
Stores the last raw JSON response received from the API.
-
-
Konstruktordetails
-
Symbology
Constructs a newSymbologyinstance using the given client.- Parameter:
client- theScryfallClientused to perform API requests
-
-
Methodendetails
-
getCardSymbols
Retrieves all card symbols from the Scryfall API.- Gibt zurück:
- a
SymbologyResponsecontaining all available card symbols - Löst aus:
SymbologyResponseException- if the request fails or the response is invalid
-
getManaCost
Parses a mana cost string into its structured representation.This method sends the given mana cost to the Scryfall API and returns a parsed response describing the individual symbols and their properties.
- Parameter:
manaCost- the mana cost string to parse (e.g.,"{2}{G}{G}"or"WUBRG")- Gibt zurück:
- a
ManaCostResponserepresenting the parsed mana cost - Löst aus:
SymbologyResponseException- if the request fails or the response is invalid
-