Package net.dzultra.jsa
Klasse ScryfallClient
java.lang.Object
net.dzultra.jsa.ScryfallClient
A simple client wrapper for interacting with the Scryfall API.
This class provides a preconfigured HttpClient and HttpRequest.Builder
with default headers such as User-Agent and Accept. It serves as a base
for making HTTP requests to the Scryfall API.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final StringThe base URL for all Scryfall API endpoints.final HttpClientThe HTTP client used to send requests.final HttpRequest.BuilderA preconfigured request builder with default headers.final StringThe User-Agent string used for all API requests. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungScryfallClient(String userAgent) Constructs a newScryfallClientwith the specified User-Agent. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the base URL for the Scryfall API.Returns the User-Agent used by this client.
-
Felddetails
-
httpClient
The HTTP client used to send requests. -
requestBuilder
A preconfigured request builder with default headers. -
BASE_URL
The base URL for all Scryfall API endpoints.- Siehe auch:
-
userAgent
The User-Agent string used for all API requests.
-
-
Konstruktordetails
-
ScryfallClient
Constructs a newScryfallClientwith the specified User-Agent.Initializes a default
HttpClientand configures the request builder with the provided User-Agent and an Accept header for JSON responses.- Parameter:
userAgent- the User-Agent string to include in all requests; should identify your application according to Scryfall API guidelines
-
-
Methodendetails
-
getBaseUrl
Returns the base URL for the Scryfall API.- Gibt zurück:
- the base API URL as a string
-
getUserAgent
Returns the User-Agent used by this client.- Gibt zurück:
- the User-Agent string
-