Package dev.dokimos.server.client
Class DokimosServerReporter.Builder
java.lang.Object
dev.dokimos.server.client.DokimosServerReporter.Builder
- Enclosing class:
DokimosServerReporter
Builder for
DokimosServerReporter.-
Method Summary
Modifier and TypeMethodDescriptionSets the API key for authentication.apiVersion(String apiVersion) Sets the API version to use.build()Builds the reporter.projectName(String projectName) Sets the project name.Sets the Dokimos server URL.
-
Method Details
-
serverUrl
Sets the Dokimos server URL.- Parameters:
serverUrl- the server URL, e.g. "https://api.my-domain.com"- Returns:
- this builder
-
projectName
Sets the project name.- Parameters:
projectName- the project name- Returns:
- this builder
-
apiVersion
Sets the API version to use.If not specified, defaults to
DokimosServerReporter.DEFAULT_API_VERSION.- Parameters:
apiVersion- the API version, e.g. "v1" or "v2"- Returns:
- this builder
-
apiKey
Sets the API key for authentication.- Parameters:
apiKey- the API key- Returns:
- this builder
-
build
Builds the reporter.- Returns:
- a new
DokimosServerReporter - Throws:
IllegalStateException- if serverUrl or projectName is not set
-