Package net.dzultra.jsa.sets
Klasse SetRequester
java.lang.Object
net.dzultra.jsa.sets.SetRequester
High-level API service for retrieving Magic: The Gathering set data.
This class provides simplified access to Scryfall set-related endpoints,
abstracting away request building and execution. It delegates HTTP calls
and response handling to SetSearchExecutor.
It acts as the main entry point for set-related operations in the JSA library.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungfinal ScryfallClientThe Scryfall client responsible for HTTP communication.final SetSearchExecutorThe executor responsible for performing API requests and parsing responses.protected com.google.gson.GsonGson instance used for JSON serialization and deserialization. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungRetrieves all available Magic: The Gathering sets.getSetByCode(String code) Retrieves a Magic: The Gathering set by its set code.getSetByTCGPlayerID(int id) Retrieves a set using its TCGPlayer identifier.getSetByUUID(UUID id) Retrieves a set using its unique UUID.
-
Felddetails
-
gson
protected com.google.gson.Gson gsonGson instance used for JSON serialization and deserialization. -
client
The Scryfall client responsible for HTTP communication. -
executor
The executor responsible for performing API requests and parsing responses.
-
-
Konstruktordetails
-
SetRequester
Constructs a newSetRequester.Initializes the internal
SetSearchExecutorusing the provided client and a defaultGsoninstance.- Parameter:
client- the Scryfall client used for API communication
-
-
Methodendetails
-
getAllSets
Retrieves all available Magic: The Gathering sets.- Gibt zurück:
- a
MTGSetListcontaining all sets returned by the API
-
getSetByCode
Retrieves a Magic: The Gathering set by its set code.- Parameter:
code- the set code (e.g.,"neo","khm")- Gibt zurück:
- the corresponding
MTGSet
-
getSetByTCGPlayerID
Retrieves a set using its TCGPlayer identifier.- Parameter:
id- the numeric TCGPlayer ID- Gibt zurück:
- the corresponding
MTGSet
-
getSetByUUID
Retrieves a set using its unique UUID.- Parameter:
id- the UUID of the set- Gibt zurück:
- the corresponding
MTGSet
-