Class ZulipConfiguration
java.lang.Object
com.github.jamesnetherton.zulip.client.http.ZulipConfiguration
Provides configuration options for the Zulip HTTP client library.
-
Constructor Summary
ConstructorsConstructorDescriptionZulipConfiguration(URL zulipUrl, String email, String apiKey) Constructs aZulipConfiguration -
Method Summary
Modifier and TypeMethodDescriptionstatic ZulipConfigurationCreates aZulipConfigurationinstance from a zuliprc properties file that is stored within the user home directory.static ZulipConfigurationfromZuliprc(File zulipRcFile) Creates aZulipConfigurationinstance from the specified zuliprc properties file.getEmail()booleanvoidSets the API key to use for authenticating with the Zulip servervoidSets the email address to use for authenticating with the Zulip servervoidsetInsecure(boolean insecure) Whether to trust all SSL certificates.voidsetProxyPassword(String proxyPassword) The proxy server password to authenticate with the proxy server when making Zulip API requests.voidsetProxyUrl(URL proxyUrl) The full URL to the proxy server that is to be used for Zulip API requests.voidsetProxyUsername(String proxyUsername) The proxy server username to authenticate with the proxy server when making Zulip API requests.voidsetZulipHttpClientFactory(ZulipHttpClientFactory zulipHttpClientFactory) TheZulipHttpClientFactoryto use for configuring theZulipHttpClient.voidsetZulipUrl(URL zulipUrl) TheURLfor the Zulip server.
-
Constructor Details
-
ZulipConfiguration
Constructs aZulipConfiguration- Parameters:
zulipUrl- The URL of the Zulip serveremail- The user email address to use for authenticationapiKey- The user API key to use for authentication
-
-
Method Details
-
getApiKey
-
setApiKey
Sets the API key to use for authenticating with the Zulip server- Parameters:
apiKey- The user API key
-
setEmail
Sets the email address to use for authenticating with the Zulip server- Parameters:
email- The user email address
-
getEmail
-
setInsecure
public void setInsecure(boolean insecure) Whether to trust all SSL certificates. NOT recommended for production usage.- Parameters:
insecure-trueif unknown certificates should be trusted.falseto not trust unknown certificates and to receive an exception
-
isInsecure
public boolean isInsecure() -
setProxyUrl
The full URL to the proxy server that is to be used for Zulip API requests.- Parameters:
proxyUrl- TheURLrepresenting the proxy server URL
-
getProxyUrl
-
setProxyUsername
The proxy server username to authenticate with the proxy server when making Zulip API requests.- Parameters:
proxyUsername- The proxy server username
-
getProxyUsername
-
setProxyPassword
The proxy server password to authenticate with the proxy server when making Zulip API requests.- Parameters:
proxyPassword- The proxy server password
-
getProxyPassword
-
setZulipHttpClientFactory
TheZulipHttpClientFactoryto use for configuring theZulipHttpClient.- Parameters:
zulipHttpClientFactory- The client factory implementation to use
-
getZulipHttpClientFactory
-
setZulipUrl
TheURLfor the Zulip server. Note this should be the base url without the /api/v1 suffix.- Parameters:
zulipUrl- The Zulip server URL
-
getZulipUrl
-
fromZuliprc
Creates aZulipConfigurationinstance from a zuliprc properties file that is stored within the user home directory.- Returns:
- The
ZulipConfigurationcreated from the properties within the zuliprc file
-
fromZuliprc
Creates aZulipConfigurationinstance from the specified zuliprc properties file.- Returns:
- The
ZulipConfigurationcreated from the properties within the zuliprc file
-