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 ZulipConfiguration
Creates aZulipConfiguration
instance from a zuliprc properties file that is stored within the user home directory.static ZulipConfiguration
fromZuliprc
(File zulipRcFile) Creates aZulipConfiguration
instance from the specified zuliprc properties file.getEmail()
boolean
void
Sets the API key to use for authenticating with the Zulip servervoid
Sets the email address to use for authenticating with the Zulip servervoid
setInsecure
(boolean insecure) Whether to trust all SSL certificates.void
setProxyPassword
(String proxyPassword) The proxy server password to authenticate with the proxy server when making Zulip API requests.void
setProxyUrl
(URL proxyUrl) The full URL to the proxy server that is to be used for Zulip API requests.void
setProxyUsername
(String proxyUsername) The proxy server username to authenticate with the proxy server when making Zulip API requests.void
setZulipHttpClientFactory
(ZulipHttpClientFactory zulipHttpClientFactory) TheZulipHttpClientFactory
to use for configuring theZulipHttpClient
.void
setZulipUrl
(URL zulipUrl) TheURL
for 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
-true
if unknown certificates should be trusted.false
to 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
- TheURL
representing 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
TheZulipHttpClientFactory
to use for configuring theZulipHttpClient
.- Parameters:
zulipHttpClientFactory
- The client factory implementation to use
-
getZulipHttpClientFactory
-
setZulipUrl
TheURL
for the Zulip server. Note this should be the base url without the /api/v1 suffix.- Parameters:
zulipUrl
- The Zulip server URL
-
getZulipUrl
-
fromZuliprc
Creates aZulipConfiguration
instance from a zuliprc properties file that is stored within the user home directory.- Returns:
- The
ZulipConfiguration
created from the properties within the zuliprc file
-
fromZuliprc
Creates aZulipConfiguration
instance from the specified zuliprc properties file.- Returns:
- The
ZulipConfiguration
created from the properties within the zuliprc file
-