public class SwgohAPIBuilder extends Object
SwgohAPISettings object, which will be used
to create an instance of the SwgohAPI interface.| Constructor and Description |
|---|
SwgohAPIBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SwgohAPI |
build()
Validate the
SwgohAPISettings object and construct a new SwgohAPIClient instance with it. |
SwgohAPIBuilder |
withDefaultEnums(boolean enums)
Defines the default behavior for the enums parameter if none is specified at the time of the request.
|
SwgohAPIBuilder |
withDefaultLanguage(SwgohAPI.Language language)
Defines the default language to use if none is specified at the time of the request.
|
SwgohAPIBuilder |
withPassword(String password)
Defines the password to be sent with the login request.
|
SwgohAPIBuilder |
withUsername(String username)
Defines the username to be sent with the login request.
|
public SwgohAPIBuilder withUsername(String username)
username - The username to be sent with the login requestpublic SwgohAPIBuilder withPassword(String password)
password - The password to be sent with the login requestpublic SwgohAPIBuilder withDefaultLanguage(SwgohAPI.Language language)
language - The language to use for all API requests, unless overridden at the call level.public SwgohAPIBuilder withDefaultEnums(boolean enums)
enums - The default value of the enums parameter to use for all API requests, unless overridden at the call level.public SwgohAPI build()
SwgohAPISettings object and construct a new SwgohAPIClient instance with it.SwgohAPIException - if the validation of the settings object fails.SwgohAPISettings.validate()Copyright © 2018. All rights reserved.