Class Zulip
java.lang.Object
com.github.jamesnetherton.zulip.client.Zulip
- All Implemented Interfaces:
Closeable
,AutoCloseable
The Zulip client. The entrypoint to accessing Zulip REST APIs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder class for constructing the Zulip Client. -
Constructor Summary
ConstructorsConstructorDescriptionZulip
(ZulipConfiguration configuration) Constructs a newZulip
instance with the providedZulipConfiguration
.Constructs a newZulip
instance. -
Method Summary
Modifier and TypeMethodDescriptionchannels()
Access the collection of channel Zulip APIs.void
close()
Closes the underlying HTTP client and frees up resources.drafts()
Access the collection of draft Zulip APIs.events()
Access the collection of event Zulip APIs.Access the collection of invitation Zulip APIs.messages()
Access the collection of message Zulip APIs.server()
Access the collection of server and organization Zulip APIs.snippets()
Access the collection of saved snippet Zulip APIs.streams()
Access the collection of stream Zulip APIs.users()
Access the collection of user Zulip APIs.
-
Constructor Details
-
Zulip
Constructs a newZulip
instance.- Parameters:
email
- The email address to use for authentication with the Zulip serverapiKey
- The API key to use for authentication with the Zulip serversite
- The URL of the Zulip server- Throws:
ZulipClientException
- If there was a problem constructing the Zulip client
-
Zulip
Constructs a newZulip
instance with the providedZulipConfiguration
.- Parameters:
configuration
- TheZulipConfiguration
to use for configuring the Zulip client- Throws:
ZulipClientException
- If there was a problem constructing the Zulip client
-
-
Method Details
-
channels
Access the collection of channel Zulip APIs.Since channels are analogous to streams. The
StreamService
is returned.- Returns:
- The
StreamService
Zulip channel APIs
-
drafts
Access the collection of draft Zulip APIs.- Returns:
- The
DraftService
Zulip draft APIs
-
events
Access the collection of event Zulip APIs.- Returns:
- The
EventService
Zulip event APIs
-
invitations
Access the collection of invitation Zulip APIs.- Returns:
- The
InvitationService
Zulip event APIs
-
messages
Access the collection of message Zulip APIs.- Returns:
- The
MessageService
Zulip message APIs
-
server
Access the collection of server and organization Zulip APIs.- Returns:
- The
ServerService
Zulip server and organization APIs
-
snippets
Access the collection of saved snippet Zulip APIs.- Returns:
- The
SnippetService
Zulip saved snippet APIs
-
streams
Access the collection of stream Zulip APIs.- Returns:
- The
StreamService
Zulip stream APIs
-
users
Access the collection of user Zulip APIs.- Returns:
- The
UserService
Zulip user APIs
-
close
public void close()Closes the underlying HTTP client and frees up resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-