Class GetApiKeyApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.server.request.GetApiKeyApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<String>
Zulip API request builder for getting a user API key.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGetApiKeyApiRequest
(ZulipHttpClient client, String username) Constructs aGetApiKeyApiRequest
.GetApiKeyApiRequest
(ZulipHttpClient client, String username, String password) Constructs aGetApiKeyApiRequest
. -
Method Summary
Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString
-
Field Details
-
PASSWORD
- See Also:
-
USERNAME
- See Also:
-
-
Constructor Details
-
GetApiKeyApiRequest
Constructs aGetApiKeyApiRequest
. To obtain an API key for development servers- Parameters:
client
- The Zulip HTTP clientusername
- The username to fetch the development API key for
-
GetApiKeyApiRequest
Constructs aGetApiKeyApiRequest
. To obtain an API key for production servers- Parameters:
client
- The Zulip HTTP clientusername
- The username to fetch the development API key forpassword
- The password to fetch the development API key for
-
-
Method Details
-
execute
Executes the Zulip API request for getting a user API development key.- Specified by:
execute
in interfaceExecutableApiRequest<String>
- Returns:
- The users API development key
- Throws:
ZulipClientException
- if the request was not successful
-