Class RequestBuilder<T>
java.lang.Object
de.chojo.universalis.rest.requests.RequestBuilder<T>
- Type Parameters:
T- type of response
- All Implemented Interfaces:
Request<T>
- Direct Known Subclasses:
ContentRequestImpl, DataCentersRequestImpl, HistoryRequestImpl, LeastRecentlyUpdatedRequestImpl, MarketableRequestImpl, MarketBoardRequestImpl, MostRecentlyUpdatedRequestImpl, TaxRatesRequestImpl, UploaderUploadCountsRequestImpl, UploadHistoryRequestImpl, WorldsRequestImpl, WorldUploadCountsRequestImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRequestBuilder(UniversalisRestImpl rest, Class<T> result) Create a new request builderRequestBuilder(UniversalisRestImpl rest, Class<T> result, Consumer<T> postRetrievalHook) Creates a new request builder -
Method Summary
Modifier and TypeMethodDescriptioncomplete()Sends the request and handles the response on the current threadvoidRecords that a top-level scope (world/dataCenter/region) has been chosen.voidAdds a parameter to the urivoidAdds an element to the path.voidAdds an element to the path.queue()Queue the request asynchronous.toString()
-
Field Details
-
rest
-
-
Constructor Details
-
RequestBuilder
Create a new request builder- Parameters:
rest- rest clientresult- result of the request
-
RequestBuilder
Creates a new request builder- Parameters:
rest- rest clientresult- result of the requestpostRetrievalHook- modification of the result
-
-
Method Details
-
markScope
Records that a top-level scope (world/dataCenter/region) has been chosen. Throws if a scope is already set — request scopes are mutually exclusive. -
parameter
-
path
-
path
-
queue
-
complete
-
toString
-