Class ServerService
java.lang.Object
com.github.jamesnetherton.zulip.client.api.server.ServerService
- All Implemented Interfaces:
ZulipService
Zulip server management APIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddApnsDeviceToken
(String token, String appId) Adds an APNs device token to register for iOS push notificationsaddCodePlayground
(String name, String pygmentsLanguage, String urlTemplate) Adds a code playground.addFcmRegistrationToken
(String token) Adds an FCM registration token.addLinkifier
(String pattern, String urlTemplate) Adds a linkifier.createBigBlueButtonVideoCall
(String meetingName) Creates a BigBlueButton video call.Creates a custom profile field.Creates a data export.deleteCustomProfileField
(long profileFieldId) Deletes a custom profile field.deleteLinkifier
(long id) Deletes a linkifier.Gets all data exports.Gets a user development API key.Gets all custom profile fields.Gets users that have consented to their private data being exported.getDevelopmentApiKey
(String username) Gets a user development API key.getEmoji()
Gets all custom emoji.Gets all linkifiers.Gets Zulip server organization settings.registerE2EMobilePushDevice
(TokenKind tokenKind, int pushAccountId, String pushPublicKey, String bouncerPublicKey, String encryptedPushRegistration) Registers a E2E mobile push device.removeApnsDeviceToken
(String token) Removes an APNs device token.removeCodePlayground
(long codePlaygroundId) Removes a code playground.removeFcmRegistrationToken
(String token) Removes an FCM registration token.reorderCustomProfileFields
(int... order) Reorders custom profile fields.reorderLinkifiers
(long... order) Reorders linkifiers.Sends E2E mobile push test notifications.Sends mobile push test notifications.testWelcomeBotCustomMessage
(String welcomeMessageCustomTest) Tests the welcome bot custom message.updateLinkifier
(long id, String pattern, String urlTemplate) Updates a linkifier.Updates realm level default settings for new users.uploadEmoji
(String name, File emojiFile) Uploads a custom emoji image file.
-
Constructor Details
-
ServerService
Constructs aServerService
.- Parameters:
client
- The Zulip HTTP client
-
-
Method Details
-
addLinkifier
Adds a linkifier.- Parameters:
pattern
- The regular expression that should trigger the linkifierurlTemplate
- The RFC 6570 compliant URL template used for the link- Returns:
- The
AddLinkifierApiRequest
builder object - See Also:
-
updateLinkifier
Updates a linkifier.- Parameters:
id
- The id of the linkifier to updatepattern
- The regular expression that should trigger the linkifierurlTemplate
- The RFC 6570 compliant URL template used for the link- Returns:
- The
UpdateLinkifierApiRequest
builder object - See Also:
-
deleteLinkifier
Deletes a linkifier.- Parameters:
id
- The id of the linkifier to delete- Returns:
- The
DeleteLinkifierApiRequest
builder object - See Also:
-
getLinkifiers
Gets all linkifiers.- Returns:
- The
GetLinkifiersApiRequest
builder object - See Also:
-
reorderLinkifiers
Reorders linkifiers.- Parameters:
order
- The array of linkifier ids representing their order- Returns:
- The
ReorderLinkifiersApiRequest
builder object - See Also:
-
uploadEmoji
Uploads a custom emoji image file.- Parameters:
name
- The name of the emojiemojiFile
- The file containing the emoji image to be uploaded- Returns:
- The
UploadEmojiApiRequest
builder object - See Also:
-
getEmoji
Gets all custom emoji.- Returns:
- The
GetAllEmojiApiRequest
builder object - See Also:
-
getServerSettings
Gets Zulip server organization settings.- Returns:
- The
GetServerSettingsApiRequest
builder object - See Also:
-
getCustomProfileFields
Gets all custom profile fields.- Returns:
- The
GetProfileFieldsApiRequest
builder object - See Also:
-
reorderCustomProfileFields
Reorders custom profile fields.- Parameters:
order
- The array of custom profile field ids in the order that they should appear on the Zulip UI- Returns:
- The
ReorderProfileFieldsApiRequest
builder object - See Also:
-
deleteCustomProfileField
Deletes a custom profile field.- Parameters:
profileFieldId
- The id of the profile field to delete- Returns:
- The
DeleteProfileFieldApiRequest
builder object.
-
createCustomProfileField
Creates a custom profile field.
This API is only available to organization administrators.
- Returns:
- The
CreateProfileFieldApiRequest
builder object - See Also:
-
getDevelopmentApiKey
Gets a user development API key. Only available for development servers. This endpoint is not available on production servers.- Parameters:
username
- The username to fetch the development API key for- Returns:
- The
GetApiKeyApiRequest
builder object
-
getApiKey
Gets a user development API key. Only available for production servers. This endpoint is not available on development servers.- Parameters:
username
- The username to fetch the development API key forpassword
- The password to fetch the development API key for- Returns:
- The
GetApiKeyApiRequest
builder object
-
addCodePlayground
public AddCodePlaygroundApiRequest addCodePlayground(String name, String pygmentsLanguage, String urlTemplate) Adds a code playground.- Parameters:
name
- The name of the playgroundpygmentsLanguage
- The name of the Pygments language lexer for that programming languageurlTemplate
- The URL template for the playground- Returns:
- The
AddCodePlaygroundApiRequest
builder object - See Also:
-
removeCodePlayground
Removes a code playground.- Parameters:
codePlaygroundId
- The id of the code playground to remove- Returns:
- The
RemoveCodePlaygroundApiRequest
builder object - See Also:
-
updateRealmNewUserDefaultSettings
Updates realm level default settings for new users.- Returns:
- The
UpdateRealmNewUserDefaultSettingsApiRequest
builder object - See Also:
-
sendMobilePushTestNotification
Sends mobile push test notifications.- Returns:
- The
SendMobilePushTestNotification
builder object - See Also:
-
addApnsDeviceToken
Adds an APNs device token to register for iOS push notifications- Parameters:
token
- The token provided by the deviceappId
- The ID of the Zulip app that is making the request- Returns:
- The
AddApnsDeviceTokenApiRequest
builder object - See Also:
-
removeApnsDeviceToken
Removes an APNs device token.- Parameters:
token
- The token provided by the device- Returns:
- The
RemoveApnsDeviceTokenApiRequest
builder object - See Also:
-
addFcmRegistrationToken
Adds an FCM registration token.- Parameters:
token
- The token provided by the device- Returns:
- The
AddFcmRegistrationTokenApiRequest
builder object - See Also:
-
removeFcmRegistrationToken
Removes an FCM registration token.- Parameters:
token
- The token provided by the device- Returns:
- The
RemoveFcmRegistrationTokenApiRequest
builder object - See Also:
-
createBigBlueButtonVideoCall
Creates a BigBlueButton video call.- Parameters:
meetingName
- Meeting name for the BigBlueButton video call- Returns:
- The
CreateBigBlueButtonVideoCallApiRequest
builder object - See Also:
-
getAllDataExports
Gets all data exports.- Returns:
- The
GetAllDataExportsApiRequest
builder object - See Also:
-
createDataExport
Creates a data export.- Returns:
- The
CreateDataExportApiRequest
builder object - See Also:
-
getDataExportConsentState
Gets users that have consented to their private data being exported.- Returns:
- The
GetDataExportConsentStateApiRequest
builder object - See Also:
-
testWelcomeBotCustomMessage
public TestWelcomeBotCustomMessageApiRequest testWelcomeBotCustomMessage(String welcomeMessageCustomTest) Tests the welcome bot custom message.- Parameters:
welcomeMessageCustomTest
- The custom welcome message content- Returns:
- The
TestWelcomeBotCustomMessageApiRequest
builder object - See Also:
-
sendE2EMobilePushTestNotification
Sends E2E mobile push test notifications.- Returns:
- The
SendE2EMobilePushTestNotification
builder object - See Also:
-
registerE2EMobilePushDevice
public RegisterE2EMobilePushDevice registerE2EMobilePushDevice(TokenKind tokenKind, int pushAccountId, String pushPublicKey, String bouncerPublicKey, String encryptedPushRegistration) Registers a E2E mobile push device.- Parameters:
tokenKind
- TheTokenKind
for how the token was generatedpushAccountId
- Random integer to be included in mobile push notifications invalid input: '&' encrypted payloads to identify pushes as being related to this registrationpushPublicKey
- Push public key encoded using an RFC 4648 standard base64 encoderbouncerPublicKey
- Bouncer public key encoded using an RFC 4648 standard base64 encoderencryptedPushRegistration
- Ciphertext generated by encrypting a PushRegistration Map using the bouncer_public_key field. Encoded using an RFC 4648 standard base64 encoder. The PushRegistration map contains fields token, token_kind, timestamp, and for iOS devices ios_app_id. The map must be JSON encoded before encryption.- Returns:
- The
RegisterE2EMobilePushDevice
builder object - See Also:
-