Class ZulipApiResponse
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse
- Direct Known Subclasses:
AddCodePlaygroundApiResponse
,AddLinkifierApiResponse
,AlertWordsApiResponse
,CreateBigBlueButtonVideoCallApiResponse
,CreateDataExportApiResponse
,CreateDraftsApiResponse
,CreateProfileFieldApiResponse
,CreateReusableInvitationLinkApiResponse
,CreateSavedSnippetApiResponse
,CreateUserApiResponse
,DeleteTopicApiResponse
,EditMessageApiResponse
,FileUploadApiResponse
,GetAllDataExportsApiResponse
,GetAllEmojiApiResponse
,GetAllInvitationsApiResponse
,GetAllUserPresenceApiResponse
,GetAllUsersApiResponse
,GetApiKeyApiResponse
,GetDataExportConsentStateApiResponse
,GetDraftsApiResponse
,GetLinkifiersApiResponse
,GetMessageApiResponse
,GetMessageEventsApiResponse
,GetMessageHistoryApiResponse
,GetMessageReadReceiptsApiResponse
,GetMessagesApiResponse
,GetProfileFieldsApiResponse
,GetSavedSnippetsApiResponse
,GetScheduledMessagesApiResponse
,GetServerSettingsApiResponse
,GetStreamApiResponse
,GetStreamEmailAddressApiResponse
,GetStreamIdApiResponse
,GetStreamsApiResponse
,GetStreamSubscribersApiResponse
,GetStreamTopicsApiResponse
,GetSubGroupsOfUserGroupApiResponse
,GetSubscribedStreamsApiResponse
,GetSubscriptionStatusApiResponse
,GetUserApiResponse
,GetUserAttachmentsApiResponse
,GetUserGroupMembersApiResponse
,GetUserGroupMembershipStatusApiResponse
,GetUserGroupsApiResponse
,GetUserPresenceApiResponse
,GetUserStatusApiResponse
,MatchesNarrowApiResponse
,RegisterEventQueueApiResponse
,RenderMessageApiResponse
,SendMessageApiResponse
,SendScheduledMessageApiResponse
,SubscribeStreamsApiResponse
,UnsubscribeStreamsApiResponse
,UpdateMessageFlagsApiResponse
,UpdateMessageFlagsForNarrowApiResponse
,UpdateNotificationSettingsApiResponse
,UpdateOwnUserPresenceApiResponse
,UpdateOwnUserSettingsApiResponse
,UpdateRealmNewUserDefaultSettingsApiResponse
,UpdateStreamSubscriptionSettingsApiResponse
,UserApiResponse
The default Zulip REST API response object.
Some API responses add additional information hence this class can be extended with additional fields.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the ist of parameters sent in the request that are not supported by the target endpoint.Gets the code from the Zulip API response.Gets the message from the Zulip API response.boolean
Determines whether the Zulip API request was partially completed due to a request timeout.boolean
Determines whether the Zulip API request was successful.
-
Constructor Details
-
ZulipApiResponse
public ZulipApiResponse()
-
-
Method Details
-
getResponseMessage
Gets the message from the Zulip API response. Usually empty for a successful response. When the response is not successful, the message usually provides additional information about the error.- Returns:
- The response message
-
getResponseCode
Gets the code from the Zulip API response. Usually empty for a successful response. When the response is not successful, the code provides additional information about the error.- Returns:
- The response code
-
isSuccess
public boolean isSuccess()Determines whether the Zulip API request was successful. HTTP response codes in the range 40x - 50x will are considered unsuccessful.- Returns:
true
if the Zulip API request was successful. {code false} otherwise
-
isPartiallyCompleted
public boolean isPartiallyCompleted()Determines whether the Zulip API request was partially completed due to a request timeout.- Returns:
true
if the Zulip API request was partially completed. {code false} otherwise
-
getIgnoredParametersUnsupported
Gets the ist of parameters sent in the request that are not supported by the target endpoint. Will be null if no parameters were ignored or if the request was made to a Zulip server with a version less than 7.0.- Returns:
- The list of ignored parameters that are not supported by the request target endpoint
-