Package de.chojo.universalis.rest
Class UniversalisRestBuilder
java.lang.Object
de.chojo.universalis.rest.UniversalisRestBuilder
Class to build an universalis rest client
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the api.setExecutorService
(ScheduledExecutorService executorService) Set the executor service used for asynchronous requests.setHttp
(HttpClient http) Set the http client used to send requests to universalissetItemNameSupplier
(NameSupplier nameSupplier) Set the item name supplier.
-
Constructor Details
-
UniversalisRestBuilder
public UniversalisRestBuilder()
-
-
Method Details
-
setHttp
Set the http client used to send requests to universalis- Parameters:
http
- client- Returns:
- builder
-
setExecutorService
@CheckReturnValue public UniversalisRestBuilder setExecutorService(ScheduledExecutorService executorService) Set the executor service used for asynchronous requests.- Parameters:
executorService
- executor service- Returns:
- builder
-
setItemNameSupplier
Set the item name supplier. This is required to get item names on runtime. UseItems.create()
to get a default implementation using a fallback file.- Parameters:
nameSupplier
- name supplier- Returns:
- builder
-
build
Build the api. The instance is ready to use.- Returns:
- api instance
-