Package net.worcade.client
Interface WorcadeBuilder
-
public interface WorcadeBuilderSeeWorcade.builder()for how to obtain an instance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorcadeBuilderbaseUrl(String url)The URL of the Worcade server.Result<? extends Worcade>build()Creates aWorcadeclient instance, and checks its server url and version.WorcadeBuilderdisableETagCache()If your application is a simple script to read or update a few entities, and then exit, it might be beneficial to disable this cache.
-
-
-
Method Detail
-
baseUrl
WorcadeBuilder baseUrl(String url)
The URL of the Worcade server. Defaults to https://worcade.net
-
disableETagCache
WorcadeBuilder disableETagCache()
If your application is a simple script to read or update a few entities, and then exit, it might be beneficial to disable this cache. If your app is more than a simple script, please don't disable the cache.
-
build
Result<? extends Worcade> build()
Creates aWorcadeclient instance, and checks its server url and version. If the server cannot be reached, this method will return with aResultwith aResult.MessagewithCodeCode.NO_CONNECTION. You can call this method multiple times, but a new client with its own cache will be created each time. To obtain an instance that reuses the client, but allows different authentication, use theWorcade.copyWithSameAuth()method.- Throws:
IncompatibleVersionException- If the server is of an earlier version than the client, or of a different major version.
-
-