connectycube_chat library

Classes

AddRemoveAdminsQuery
AddressBookResult
AttachmentElement
AutoManagedQuery<T>
BaseAuthQuery<T>
ChatMessagesManager
ChatStateElement
CreateDialogQuery
CreateMessageQuery
CreateSessionQuery
CreateUserQuery
CubeAttachment
CubeAttachmentType
CubeChatConnection
CubeChatConnectionSettings
CubeContact
CubeDialog
CubeDialogCustomData
CubeDialogType
CubeEntity
CubeEnvironment
CubeMessage
CubeMessageReactions
CubeMessageStanza
CubePlatform
CubePrivacyAction
CubePrivacyListItem
CubeProvider
CubeSession
CubeSessionManager
CubeSettings
CubeUser
CubeXmppElement
CubeXmppElementBase
DeleteDialogQuery
DeleteDialogsQuery
DeleteItemsResult
DeleteMessagesQuery
DeleteSessionQuery
DeleteUserQuery
EditedMessageStatus
EditMessageElement
EnableMobileElement
ExtraParamsElement
GetAddressBookQuery
GetDialogOccupantsQuery
GetDialogsCountQuery
GetDialogsQuery
GetMessageQuery
GetMessageReactionsQuery
GetMessagesCountQuery
GetMessagesParameters
GetNotificationsSettingsQuery
GetRegisteredUsers
GetSessionQuery
GetUnreadMessagesCountQuery
GetUserQuery
GetUsersQuery
GetUsersV2Query
GlobalMessagesManager
GlobalSearchParams
GlobalSearchQuery
GlobalSearchResult
JoinPresenceStanza
JoinXElement
LastActivityQuery
LeavePresenceStanza
MessageMarkerElement
MessageReaction
MessagesReactionsManager
MessagesStatusesManager
MessageStatus
NotificationsChannels
NotificationType
OrderType
PagedResult<T>
PrivacyListsManager
PushEventType
Query<T>
QueryRule
ReactionsElement
RemoveMessageElement
RequestFieldType
RequestFilter
RequestPaginator
RequestSorter
ResetPasswordQuery
RestRequest
RestResponse
SelfDestroyElement
SendSystemMessageQuery
SignInQuery
SignOutQuery
SubscribeLastActivityElement
SubscribeToDialogQuery
SystemMessagesManager
TypingStatus
TypingStatusesManager
UnSubscribeFromDialogQuery
UpdateDialogParams
UpdateDialogQuery
UpdateMessageParameters
UpdateMessageQuery
UpdateMessageReactionQuery
UpdateNotificationsSettingsQuery
UpdateUserQuery
UploadAddressBookQuery

Extensions

MessageStateString on String

Constants

ADDRESS_BOOK_ENDPOINT → const String
APP_ID → const String
AUTH_ENDPOINT → const String
AUTH_KEY → const String
BLOBS_ENDPOINT → const String
BY_CRITERIA → const String
CALLS_ENDPOINT → const String
CHAT_ENDPOINT → const String
COMPACT → const String
CONTACTS → const String
DATA_ENDPOINT → const String
DIALOG_ENDPOINT → const String
EMAIL → const String
EMPTY_STRING → const String
EVENTS_ENDPOINT → const String
EXTERNAL_ID → const String
EXTERNAL_USER_ID → const String
FILTER_EMAIL → const String
FILTER_FACEBOOK_ID → const String
FILTER_FULL_NAME → const String
FILTER_ID → const String
FILTER_LOGIN → const String
FILTER_PARAM_NAME → const String
FILTER_PHONE → const String
FILTER_PREFIX → const String
FILTER_TAGS → const String
FILTER_TWITTER_ID → const String
FILTER_USER_TAGS → const String
FIREBASE_EMAIL_PROJECT_ID → const String
FIREBASE_EMAIL_TOKEN → const String
FIREBASE_PHONE_PROJECT_ID → const String
FIREBASE_PHONE_TOKEN → const String
FORCE → const String
HEADER_API_VERSION → const String
HEADER_FRAMEWORK_VERSION → const String
HEADER_FRAMEWORK_VERSION_VALUE_PREFIX → const String
HEADER_TOKEN → const String
HEADER_TOKEN_EXPIRATION_DATE → const String
KEYS_SECRET → const String
KEYS_TOKEN → const String
LIMIT → const String
MEETINGS_ENDPOINT → const String
MESSAGE_ENDPOINT → const String
MODULE_CALL_NOTIFICATIONS → const String
MODULE_IDENTIFIER → const String
MODULE_SYSTEM_NOTIFICATIONS → const String
NONCE → const String
OFFSET → const String
ORDER_PARAM_NAME → const String
PASSWORD → const String
PREFIX_CHAT_RESOURCE → const String
PROVIDER → const String
REACTIONS_ENDPOINT → const String
REGISTERED_USERS_ENDPOINT → const String
REQUEST_FORMAT → const String
RESET → const String
REST_API_VERSION → const String
SEARCH_CHAT_DATE_FORMAT → const String
SEARCH_ENDPOINT → const String
SIGNATURE → const String
SIGNIN_ENDPOINT → const String
SUBSCRIPTIONS_ENDPOINT → const String
SYSTEM_MESSAGE_ENDPOINT → const String
TIMESTAMP → const String
TOKEN_EXPIRATION_DATE_FORMAT → const String
UDID → const String
USER_EMAIL → const String
USER_FULL_NAME → const String
USER_GUEST → const String
USER_LOGIN → const String
USER_PASSWORD → const String
USER_SESSION_ENDPOINT → const String
USERS_ENDPOINT → const String
USERS_V2_ENDPOINT → const String
WHITEBOARDS_ENDPOINT → const String

Properties

isDesktop bool
no setter
isMobile bool
no setter
isWeb bool
no setter

Functions

addMessageReaction(String messageId, String reaction) Future<void>
Adds the reaction on the message with messageId messageId - the ID of the message you reacted on reaction - the reaction you want to add
addRemoveAdmins(String dialogId, {Set<int>? toAddIds, Set<int>? toRemoveIds}) Future<CubeDialog>
convertCubeItemToXmpp(CubePrivacyListItem cubeItem, int order, bool inGroup) → PrivacyListItem
createDialog(CubeDialog newDialog) Future<CubeDialog>
createMessage(CubeMessage message, [bool sendToChat = false]) Future<CubeMessage>
createSession([CubeUser? cubeUser]) Future<CubeSession>
createSessionUsingFirebase(String projectId, String accessToken) Future<CubeSession>
createSessionUsingFirebaseEmail(String projectId, String accessToken) Future<CubeSession>
createSessionUsingFirebasePhone(String projectId, String accessToken) Future<CubeSession>
createSessionUsingSocialProvider(String socialProvider, String accessToken, [String? accessTokenSecret]) Future<CubeSession>
deleteDialog(String dialogId, [bool? force]) Future<void>
deleteDialogs(Set<String> dialogsIds, [bool? force]) Future<DeleteItemsResult?>
deleteMessages(List<String> messagesIds, [bool? force]) Future<DeleteItemsResult>
deleteSession() Future<void>
deleteSessionsExceptCurrent() Future<void>
deleteUser(int userId) Future<void>
deleteUserByExternalId(int externalId) Future<void>
getAddressBook([String? udid]) Future<List<CubeContact>?>
getAllUsers() Future<PagedResult<CubeUser>?>
getAllUsersByIds(Set<int> ids, {RequestPaginator? paginator, RequestSorter? sorter}) Future<PagedResult<CubeUser>?>
ids - the set of ids of users you want to get paginator - the instance of the helper class RequestPaginator that is representing the pagination parameters in the request. Note: the paginator.page should start from 0. sorter - the instance of the helper class RequestSorter that is representing the sorting parameters in the request. The example can be var sorter = RequestSorter.desc('created_at');
getDialogIdFromGroupChatJid(Jid jid) String
getDialogNotificationsSettings(String dialogId) Future<bool>
getDialogOccupants(String dialogId) Future<PagedResult<CubeUser>?>
getDialogs([Map<String, dynamic>? params]) Future<PagedResult<CubeDialog>?>
getDialogsCount() Future<int>
getJidForGroupChat(String dialogId) String
getJidForUser(int userId, [String? resource]) String
getMessageReactions(String messageId) Future<Map<String, List<int>>>
Returns reactions associated with message with messageId Result contains the map where key is the reaction and value is the list of users' ids who reacted with this reaction messageId - the ID of the message you want to get reactions
getMessages(String dialogId, [Map<String, dynamic>? params]) Future<PagedResult<CubeMessage>?>
params - additional parameters for request. Use class-helper GetMessagesParameters to simple config request
getMessagesCount(String dialogId) Future<int>
getQueryString(Map params, {String prefix = '&', bool inRecursion = false}) String
Returns query parameters string, e.g. application_id=774&auth_key=aY7WwSRmu2-GbfA&nonce=1451135156 This function is more suitable for php API servers. Try the getUriQueryString if the server returns errors related to the syntax of the query string
getRegisteredUsersFromAddressBook(bool compact, [String? udid]) Future<List<CubeUser>?>
getSession() Future<CubeSession>
getUnreadMessagesCount([List<String>? dialogsIds]) Future<Map<String, int>>
getUriQueryString(Map<String, dynamic> params) String
Returns query parameters string, e.g. application_id=774&auth_key=aY7WwSRmu2-GbfA&nonce=1451135156 The difference between this function from the getQueryString is that this one is based on the dart specifications
getUserByEmail(String email) Future<CubeUser?>
getUserByExternalId(int externalId) Future<CubeUser?>
getUserByExternalUserId(String externalUserId) Future<CubeUser?>
getUserByFacebookId(String facebookId) Future<CubeUser?>
getUserById(int id) Future<CubeUser?>
getUserByIdentifier(String identifierName, dynamic identifierValue, {Map<String, dynamic>? additionalParameters}) Future<CubeUser?>
getUserByLogin(String login) Future<CubeUser?>
getUserByPhoneNumber(String phone) Future<CubeUser?>
getUserByTwitterId(String twitterId) Future<CubeUser?>
getUserIdFromGroupChatJid(Jid jid) int
getUserIdFromJid(Jid jid) int
getUserIdFromJidString(String jid) int
getUserIdFromNickWithMucDomain(String nick) int
getUserNickWithMucDomain(int userId) String
getUsers(Map<String, dynamic> parameters, {RequestPaginator? paginator, RequestSorter? sorter}) Future<PagedResult<CubeUser>?>
The method returns the list according to the specified list of parameters. The list of available parameters is provided in the Server API documentation by link https://developers.connectycube.com/server/users?id=retrieve-users-v2 paginator - the instance of the helper class RequestPaginator that is representing the pagination parameters in the request. Note: the paginator.page should start from 0. sorter - the instance of the helper class RequestSorter that is representing the sorting parameters in the request. The example can be var sorter = RequestSorter.desc('created_at');
getUsersByFilter(RequestFilter filter) Future<PagedResult<CubeUser>?>
Returns users by the custom filter. Possible filters provided by link https://developers.connectycube.com/server/users?id=parameters-1 For example for getting users by ids you can use the next code snippet:
getUsersByFullName(String fullName, {RequestPaginator? paginator, RequestSorter? sorter}) Future<PagedResult<CubeUser>?>
fullName - the part of the 'fullName' with which the name begins. paginator - the instance of the helper class RequestPaginator that is representing the pagination parameters in the request. Pay attention: the paginator.itemsPerPage should be 5 for this request. Note: the paginator.page should start from 0. sorter - the instance of the helper class RequestSorter that is representing the sorting parameters in the request. The example can be var sorter = RequestSorter.desc('created_at');
getUsersByTags(Set<String> tags, {RequestPaginator? paginator, RequestSorter? sorter}) Future<PagedResult<CubeUser>?>
init(String applicationId, String authorizationKey, String authorizationSecret, {Future<CubeSession> onSessionRestore()?}) → dynamic
isEmpty(String? string) bool
isEmptyList<T>(List<T>? list) bool
isGroupChatJid(Jid jid) bool
log(String? message, [String? tag]) → dynamic
logTime(String message, [String? tag]) → dynamic
removeMessageReaction(String messageId, String reaction) Future<void>
Removes the reaction on the message with messageId what was added before messageId - the ID of the message you want to delete reaction of reaction - the reaction you want to remove
resetPassword(String email) Future<void>
searchText(String searchText, [Map<String, dynamic>? params]) Future<GlobalSearchResult>
params - additional parameters for request. Use class-helper GlobalSearchParams to simple config search request
sendSystemMessage(int recipientId, Map<String, String>? properties) Future<CubeMessage>
Sends the System message to the recipientId via API request The recipient will receive this system message through the chat connection as the common system message. properties - the additional parameters that the recipient will receive in the CubeMessage.properties
setEndpoints(String apiEndpoint, String chatEndpoint) → dynamic
signIn(CubeUser user) Future<CubeUser>
signInByEmail(String email, String password) Future<CubeUser>
signInByLogin(String login, String password) Future<CubeUser>
signInUsingFirebase(String projectId, String accessToken) Future<CubeUser>
signInUsingFirebaseEmail(String projectId, String accessToken) Future<CubeUser>
signInUsingFirebasePhone(String projectId, String accessToken) Future<CubeUser>
signInUsingSocialProvider(String socialProvider, String accessToken, [String? accessTokenSecret]) Future<CubeUser>
signOut() Future<void>
signUp(CubeUser user) Future<CubeUser>
subscribeToDialog(String dialogId) Future<CubeDialog>
unSubscribeFromDialog(String dialogId) Future<void>
updateDialog(String dialogId, Map<String, dynamic> params) Future<CubeDialog>
params - additional parameters for request. Use class-helper UpdateDialogParams to simple config request.
updateDialogNotificationsSettings(String dialogId, bool enable) Future<bool>
updateMessage(String messageId, String dialogId, [Map<String, dynamic>? params]) Future<void>
params - additional parameters for request. Use class-helper UpdateMessageParameters to simple config request
updateMessageReactions(String messageId, {String? addReaction, String? removeReaction}) Future<void>
Adds and/or removes reaction on the message with messageId messageId - the ID of the message you reacted on addReaction - the new reaction you want to add removeReaction - the reaction you added before and want to delete
updateMessages(String dialogId, Map<String, dynamic> params, [Set<String>? messagesIds]) Future<void>
params - additional parameters for request. Use class-helper UpdateMessageParameters to simple config request
updateUser(CubeUser user) Future<CubeUser>
uploadAddressBook(List<CubeContact> contacts, {bool? force, String? udid}) Future<AddressBookResult?>