Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
AmityCommunityRepository:
Methods | Remarks |
---|---|
AmityCommunityParticipation
Deprecated AmityCommunityParticipation
class. Use AmityCommunityMembership
instead.
Methods | Remarks |
---|---|
AmityCommunityModeration
Methods | Remarks |
---|---|
AmityPostRepository
Methods | Remarks |
---|---|
AmityPostFlagger
Deprecated APIs in AmityPostFlagger
class. Use APIs in AmityPostRepository
instead.
AmityUserFlagger
Deprecated APIs in AmityUserFlagger
class. Use APIs in AmityUserRepository
instead.
AmityPollRepository
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
createCommunity(options:, completion:)
Use async createCommunity( options:)instead.
joinCommunity(communityId:, completion:)
Use async joinCommunity(communityId:)instead.
leaveCommunity(communityId:, completion:)
Use async leaveCommunity(communityId:)instead.
updateCommunity(id:, options:, completion:)
Use async updateCommunity(id:, options:)instead.
addMembers(userIds:, completion:)
Use async addMembers(userIds:)in AmityCommunityMembership instead.
removeMembers(userIds:, completion:)
Use async removeMembers(userIds:)in AmityCommunityMembership instead.
getMember(userId:)
Use async getMember(userId:) in AmityCommunityMembership instead.
getMembers(membershipOptions: , roles:, sortBy:)
Use async getMembers(membershipOptions: , roles:, sortBy:)in AmityCommunityMembership instead.
banMembers(userIds:, completion: )
Use async banMembers(userIds:)instead.
unbanMembers(userIds:, completion:)
Use async unbanMembers(userIds:)instead.
addRoles(roles:, userIds:, completion:)
Use async leaveCommunity(communityId:)instead.
removeRoles(roles:, userIds:, completion:)
Use async removeRoles(roles:, userIds:)instead.
createPost(builder:, targetId:, targetType:, completion:)
Use async createPost(builder:, targetId:, targetType:)instead.
createPost(builder:, targetId:, targetType:, metadata:, mentionees:, completion:)
Use async createPost(builder:, targetId:, targetType:, metadata:, mentionees:)instead.
updatePost(postId:, builder:, completion:)
Use async editPost(postId:, builder:)instead.
updatePost(postId:, builder:, metadata:, mentionees:, completion:)
Use async editPost(postId:, builder:, metadata:, mentionees:)instead.
deletePost(postId:, parentId:, hardDelete:, completion:)
Use async softDeletePost(postId:, parentId:) or hardDeletePost(postId:, parentId:) instead.
approvePost(postId:, completion:)
Use async approvePost(postId:) instead.
declinePost(postId:, completion:)
Use async declinePost(postId:)instead.
flagPost(completion:)
Use async flagPost(postId:) in AmityPostRepository instead.
unflagPost(completion:)
Use async unflagPost(postId:) in AmityPostRepository instead.
isPostFlaggedByMe(completion:)
Use async isFlaggedByMe(postId:)in AmityPostRepository instead.
flag(completion:)
Use async flagUser(userId:) in AmityUserRepository instead.
unflag(completion:)
Use async unflagUser(userId:) in AmityUserRepository instead.
isFlaggedByMe(completion:)
Use async isUserFlaggedByMe(userId:)in AmityUserRepository instead.
createPoll(options:, completion:)
Use async createPoll(options:)instead.
closePoll(pollId:, completion:)
Use async closePoll(pollId:)instead.
votePoll(pollId:, answerIds:, completion:)
Use async votePoll(pollId:, answerIds:)instead.
deletePoll(pollId:, completion:)
Use async deletePoll(pollId:)instead.
The following pages contain the migration guides of our SDKs
AmityCommentRepository:
Methods | Remarks |
---|---|
AmityCommentFlagger
Deprecated APIs in AmityCommentFlagger
class. Use APIs in AmityCommentRepository
instead.
Methods | Remarks |
---|---|
AmityUserFollowManager
Deprecated APIs in AmityUserFollowManager
class. Use APIs in AmityUserRelationship
instead.
Methods | Remarks |
---|---|
AmityChannelParticipation
Deprecated APIs in AmityChannelParticipation
class. Use APIs in AmityChannelMembership
instead.
AmityChannelModeration
AmityMessageEditor
Deprecated APIs in AmityMessageFlagger
class. Use APIs in AmityMessageRepository
instead.
AmityMessageFlagger
AmitySubChannelRepository
AmityClient
AmityMessageRepository
AmityFeedRepository
AmitySteamRepository
AmityStreamBroadcaster
Deprecated APIs in AmityClient:
Method | Remark |
---|---|
Deprecated APIs in AmityUserNotificationsManager:
Method | Remark |
---|---|
Deprecated APIs in AmityPostRepository:
Method | Remark |
---|---|
Deprecated APIs in AmityCommunityRepository:
Method | Remark |
---|---|
Deprecated APIs in AmityChannelRepository:
Method | Remark |
---|---|
Deprecated APIs in AmitySubChannelRepository:
Method | Remark |
---|---|
Deprecated APIs in AmityCommentRepository:
Method | Remark |
---|---|
Deprecated APIs in AmityChannelModeration:
Deprecated APIs in AmityMessageRepository:
Deprecated APIs in AmityStreamBroadcaster. Use the `AmityVideoBroadcaster` class instead:
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Property | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Methods | Remarks |
---|---|
Property | Remarks |
---|---|
Method | Remark |
---|---|
Method | Remark |
---|---|
Method | Remark |
---|---|
createComment(options:, completion:)
Use async createComment(options:)instead.
getLatestComment(referenceId:, referenceType:, includeReplies:)
Use async getLatestComment(referenceId:, referenceType:, includeReplies:)instead.
updateComment(commentId:, options:, completion:)
Use async updateComment(commentId:, options:)instead.
deleteComment(commentId:, hardDelete:, completion:)
Use async softDeleteComment(commentId:) or hardDeleteComment(commentId:) instead.
flag(completion:)
Use async flagComment(commentId:)in AmityCommentRepository instead.
unflag(completion:)
Use async unflagComment(commentId:) in AmityCommentRepository instead.
isFlaggedByMe(completion:)
Use async isCommentFlaggedByMe(commentId:) in AmityCommentRepository instead.
followUser(userId:, completion:)
Use async followUser(userId:)in AmityUserRelationship instead.
unfollowUser(userId:, completion:)
Use async unfollowUser(userId:) in AmityUserRelationship instead.
acceptUserRequest(userId:, completion:)
Use async acceptMyFollower(userId:) in AmityUserRelationship instead.
declineUserRequest(userId: , completion:)
Use async declineMyFollower(userId:) in AmityUserRelationship instead.
blockUser(userId:)
Use async blockUser(userId:) in AmityUserRelationship instead.
unblockUser(userId:)
Use async unblockUser(userId:) in AmityUserRelationship instead.
getMyFollowInfo()
Use async getMyFollowInfo() in AmityUserRelationship instead.
getUserFollowInfo(userId:)
Use async getFollowInfo(userId:) in AmityUserRelationship instead.
getMyFollowerList(option:)
Use async getMyFollowers(option:) in AmityUserRelationship instead.
getUserFollowerList(userId:)
Use async getFollowers(userId:)in AmityUserRelationship instead.
getUserFollowingList(userId:)
Use async getFollowings(userId:) in AmityUserRelationship instead.
addMembers(userIds:, completion:)
Use async addMembers(userIds:)in AmityChannelMembership instead.
removeMembers(userIds:, completion:)
Use async removeMembers(userIds:)in AmityChannelMembership instead.
getMembers(filter:, sortBy:, roles:)
Use async getMembers(filter:, sortBy:, roles:) in AmityChannelMembership instead.
searchMembers(displayName:, filterBuilder:, roles:)
Use async searchMembers(displayName:, filterBuilder:, roles:) in AmityChannelMembership instead.
muteMembers(userIds:, mutePeriodInSeconds:, completion:)
Use async muteMembers(userIds:, mutePeriodInSeconds:) instead.
unmuteMembers(userIds:, completion:)
Use async unmuteMembers(userIds:) instead.
banMembers(userIds:, completion:)
Use async banMembers(userIds:) instead.
unbanMembers(userIds:, completion:)
Use async unbanMembers(userIds:) instead.
addRole(role:, userIds:, completion:)
Use async addRoles(role:, userIds:, completion:) instead.
removeRole(role: , userIds: , completion:)
Use async removeRoles(role:, userIds:, completion:) instead.
editText(text:, metadata:, mentionees:, completion:)
Use async editMessage(messageId:, text:, metadata:, mentionees:) in AmityMessageRepository instead.
flag(completion:)
Use async flagMessage(messageId:) in AmityMessageRepository instead.
unflag(completion:)
Use async unflagMessage(messageId:) in AmityMessageRepository instead.
isFlaggedByMe(completion:)
Use async isMessageFlaggedByMe( messageId:) in AmityMessageRepository instead.
createSubChannel( subChannelName:, channelId:, completion:)
Use async createSubChannel( subChannelName:, channelId:) instead.
updateSubChannel( subchannelId:, updatedName:, completion:)
Use async updateSubChannel( subchannelId:, updatedName:) instead.
deleteSubChannel(subChannelId:, hardDelete:, completion:)
Use async softDeleteSubChannel( subChannelId:) or hardDeleteSubChannel( subChannelId:) instead.
currentUser
Use user instead.
deleteMessage(messageId:, completion:)
Use async softDeleteMessage(messageId:) instead.
getCustomPostRankingGlobalfeed()
Use async getCustomRankingGlobalFeed() instead.
createVideoStream(title:, description:, thumbnailImage:, meta:, completion:)
Use async createStream(title:, description:, thumbnailImage:, meta:) instead.
getStreamById(streamId:)
Use async getStream(streamId:) instead.
getStreamsCollection(query:)
Use async getStreams(query:) instead.
cameraPosition
Use switchCamera instead.
registerDeviceForPushNotification(token:)
Use registerPushNotification( token:) instead.
unregisterDeviceForPushNotification(userId:)
Use unregisterPushNotification(userId:) instead
updateUser(builder:)
Use editUser(builder:) instead.
getSettingsWithCompletion(_ completion:)
Use getSettings() instead.
createPost(builder:, targetId:, targetType:)
and
createPost(builder:, targetId:, targetType:, metadata:, mentionees:)
Use
createTextPost(builder:, targetId:, targetType:, metadata:, mentionees:) ,
createImagePost(builder:, targetId:, targetType:, metadata:, mentionees:),
createFilePost(builder:, targetId:, targetType:, metadata:, mentionees:),
createPollPost(_ builder:, targetId:, targetType:, metadata:, mentionees:)or
createLiveStreamPost(_ builder:, targetId:, targetType:, metadata:, mentionees:)
instead.
searchMembers(communityId:, keyword:, membershipOptions: , roles:, sortBy:)
Use searchMembers(communityId:, keyword:, membershipOptions: , roles:, sortBy:) in AmityCommunityMembership instead.
updateCommunity(id:, options:)
Use editCommunity(id:, options:) instead.
updateChannel(builder:)
Use editChannel(builder:) instead.
updateSubChannel( subchannelId:, updatedName:)
Use editSubChannel( subchannelId:, updatedName:) instead.
updateComment(commentId:, options:)
Use editComment(commentId:, options:) instead.
addRoles(role:, userIds:)
Use addRole(role:, userIds:) instead.
removeRoles(role:, userIds:)
Use removeRole(role:, userIds:) instead.
editMessage(messageId:, text:, metadata:, mentionees:)
Use editTextMessage(withId:, text:, metadata:, mentionees:) instead.
setup(config:)
Use setup(config:) in AmityVideoBroadcaster instead.
startPublish(existingStreamId:)
Use startPublish(existingStreamId:) in AmityVideoBroadcaster instead.
stopPublish()
Use stopPublish() in AmityVideoBroadcaster instead.
registerDeviceForPushNotification(withDeviceToken:, completion:)
Use async registerDeviceForPushNotification(withDeviceToken:) instead.
unregisterDeviceForPushNotification(forUserId:, completion:)
Use async unregisterDeviceForPushNotification(forUserId:) instead.
updateUser(builder:, completion:)
Use async updateUser(builder:) instead.
deleteMessage(withId:, completion:)
Use async deleteMessage(withId:) instead.
createCustomMessage(options:, completion:)
Use createCustomMessage(options:) instead.
createTextMessage(options:, completion:)
Use async createTextMessage(options:)instead.
createImageMessage(options:, completion:)
Use async createImageMessage(options:)instead.
createAudioMessage(options:, completion:)
Use async createAudioMessage(options:)instead.
createFileMessage(options:, completion:)
Use async createFileMessage(options:)instead.
createVideoMessage(options:, completion:)
Use async createVideoMessage(options:)instead.
flag(completion:)
Use async flag()instead.
unflag(completion:)
Use async unflag()instead.
This guide is to provide information about breaking changes and how to migrate to the AmitySDK Android 6.0.0 version.
As announced here, Deprecation announcements, this version replaces PagedList and RxJava2 with PagingData and RxJava3.
Live capability has been upgraded with RxJava3. Include RxJava3 to your project with this guide, RxJava Getting Started, or use SDK’s extension function to Rx2() to bridge the SDK functions back to RxJava2.
The Paginated collection has been upgraded with PagingData. To consume PaginData, replace Android’s PagedListAdapter with PagingDataAdapter following this guide, Paging V3 migration.
Create
Channel creation with custom id is no longer supported
Query
Message query from channel is no longer supported. Messages from each channel are migrated to the corresponding channel’s default sub-channel. Refer to Subchannel feature documentation.
StackFromEnd option is no longer supported. To achieve Chat room behaviour, use sortyBy()
with the value AmityMessageQuerySortOption.LAST_CREATED
and reverse the RecyclerView.
Create
Message creation on the channels is no longer supported. Messages must be created on Subchannels only. Refer to Subchannel feature documentation.
RTE
Automatic subscription to messages on Live and Broadcast channels is no longer supported. To receive real time updates on these channels, explicitly subscribe to the channel. Refer to RTE documentation.
Create
Comment creation with custom id is no longer supported.
All SDK classes are required to be newly imported into your project as API classes are relocated to com.amity.socialcloud.sdk.api and model classes are relocated to com.amity.socialcloud.sdk.model
AmityChannelRepository
AmityChannelParticipation
AmityChannelMembershipQuery
AmityChannelMemberSearch
AmityMessageRepository
AmityMessageQuery
AmityMessageQuery.Builder
AmityMessageReactionQuery
AmityCoreClient
AmityFileRepository
AmityMyFollowersQuery
AmityMyFollowingsQuery
AmityUserFollowersQuery
AmityUserFollowingsQuery
AmityUserQuery
AmityUserSearch
AmityUserNotification
AmityUserUpdate
AmityCommunityCategoryQuery
AmityCommentRepository
AmityCommentReactionQuery
AmityCommunityQuery
AmityCommunityModeration
AmityMembershipQuery
AmityCommunityMembershipSearch
AmityFeedRepository
AmityPostRepository
AmityCommunityPostQuery
AmityUserPostQuery
AmityGlobalFeedQuery
AmityCustomRankingGlobalFeedQuery
AmityPostReactionQuery
AmityStreamRepository
AmityStreamQuery
AmityChannel
AmityMessage
AmityComment
AmityCommunity
AmityPost
AmityStream
UIKit v3.0.0 is the major release of our UIKit with AmitySDK v6.5.0.
The guide will cover all the breaking changes and migration to this version.
UIKit v3.0.0 will require RealmSwift.xcframework
along with the existing frameworks.
This guide is to provide information about breaking changes and how to migrate to the AmitySDK iOS 6.0.0 version.
AmitySDK 6.x.x version requires RealmSwift.xcframework
along with existing frameworks.
Channel Creation
Support for Providing custom ID when creating channel is now removed.
Sub Channels:
Now you can create multiple sub-channels inside a channel. Each Sub Channels acts as a separate container for message. The channel itself would act as a default Sub Channel. You can access this default sub channel id through defaultSubChannelId
property in class AmityChannel
.
Sending a message in a Channel or Sub Channel now requires subchannelId
. If you want to send message in default subchannel (i.e the default channel itself), please use defaultSubChannelId
property from AmityChannel
.
For sending message in particular AmitySubchannel, you can get its id from subChannelId
property.
@objc
support for all interfaces such as classes, enums, methods, properties are removed. Please create a swift wrapper class to interact with the SDK if your project still uses Objective-C.
All Enums with rawType UInt
has been changed to Int
Swift classes
AmityCollection
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Changes | Remarks |
---|---|---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Name | Remark |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Methods | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Please refer to section of the documentation for more details.
Property | Methods | Changes |
---|
Property | Methods | Changes |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes |
---|
Property | Methods | Changes |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes | Remarks |
---|
Property | Methods | Changes |
---|
Property | Methods | Changes | Remarks |
---|
play(streamId: String, url: String)
Use play(streamId: String) instead
getRecordings()
Use play(streamId: String) instead
getWatcherData()
Use play(streamId: String) instead
createChannel()
createChannel(displayName: String)
Channel creation with custom id is no longer supported.
Channel creation requires displayName
fetchChannel(channelId: String)
Removed
Use getChannel(channelId: String)
instead
observeChannel(channelId: String)
Removed
Use getChannel(channelId: String)
instead
getTotalUnreadCount()
AmityChannel.getDefaultSubChannelUnreadCount()
startReading()
Removed
stopReading()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
createMessage(channelId: String)
createMessage(subChannelId: String)
getMessages(channelId: String)
getMessages(subChannelId: String)
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
stackFromEnd(stackFromEnd: Boolean)
Removed
Use sortBy(sortOption: AmityMessageQuerySortOption)
instead
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
setup(apiKey: String, httpEndpoint: String, socketEndpoint: String)
Removed
Use
setup(apiKey: String, endpoint: AmityEndpoint)
instead.
For custom endpoint, use AmityEndpoint.CUSTOM()
unregisterDeviceForPushNotification(userId: String)
Removed
Use unregisterDeviceForPushNotification()
instead
uploadAudio(uri : Uri)
Return
Flowable<AmityUploadResult<AmityAudio>>
instead of
AmityAudioUploadService.Builder
uploadFile(uri: Uri)
Return
Flowable<AmityUploadResult<AmityFile>>
instead of
AmityFileUploadService.Builder
uploadImage(uri: Uri)
Return
Flowable<AmityUploadResult<AmityImage>>
instead of
AmityImageUploadService.Builder
uploadVideo(uri: Uri)
Removed
Use uploadVideo(uri: Uri, contentFeedType: AmityContentFeedType)
instead
uploadVideo(uri: Uri, contentFeedType: AmityContentFeedType)
Return
Flowable<AmityUploadResult<AmityVideo>>
instead of
AmityVideoUploadService.Builder
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
setAllowed(isAllowed: Boolean)
Removed
Use enable()
or disable()
instead
isAllowed
Removed
Use getSettings()
instead
update()
apply()
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
observeComment(commentId: String)
getComment(commentId: String)
createComment(commentId: String)
Removed
Comment creation with custom id is no longer supported
deleteComment(commentId: String)
softDeleteComment(commentId: String)
deleteComment(commentId: String, hardDelete: Boolean)
hardDeleteComment(commentId: String)
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
addRole(role: String, userIds: List)
Removed
Use addRoles(role: List<String>), userIds: List<String>)
instead
removeRole(role: String, userIds: List)
Removed
Use removeRoles(role: List<String>), userIds: List<String>)
instead
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
createPost()
Removed
Use equivalent method in AmityPostRepository instead
getPost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
deletePost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
reviewPost(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
getReactions(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
getComments(postId: String)
Removed
Use equivalent method in AmityPostRepository instead
deletePost(postId: String)
softDeletePost(postId: String)
deletePost(postId: String, hardDelete: Boolean)
hardDeletePost(postId: String)
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
query()
Return Flowable<PagingData<X>> instead of Flowable<PagedList<X>>
getPagingData()
Removed
getStream(streamId: String)
Removed
Use observeStream(streamId: String)
instead
getStream(streamId: String)
Removed
Use observeStream(streamId: String)
instead
getUnreadCount()
getDefaultSubChannelUnreadCount()
hasUnreadMention()
hasDefaultSubChannelUnreadMention()
getChannelSegment()
getSegment()
getChildrenNumber()
getChildCount()
getUser()
getCreator()
getUserId()
getCreatorId()
getChildrenNumber()
getChildCount()
getUser()
getCreator()
getUserId()
getCreatorId()
getUser()
getCreator()
getUserId()
getCreatorId()
getUser()
getCreator()
getUserId()
getCreatorId()
getUser()
getCreator()
registerDeviceForPushNotifications() | Use registerPushNotification() instead |
unregisterDeviceForPushNotifications() | Use unregisterPushNotification() instead |
notification() | Use notifications.user() instead |
notification() | Use AmityCoreClient.notifications().channel() instead |
notification() | Use AmityCoreClient.notifications.community() instead |
membership().addMembers() | Use moderation().addMembers() instead |
membership().removeMembers() | Use moderation().removeMembers() instead |
moderation().banUsers() | Use moderation().banMembers() instead |
moderation().unbanUsers() | Use moderation().unbanMembers() instead |
getReactions() | Use AmityCoreClient.newReactionRepository.getReactions() instead |
react() | Use AmityCoreClient.newReactionRepository().addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead |
report() | Use AmitySocialClient.newCommentRepository().flagComment() or AmitySocialClient.newCommentRepository().unflagComment() instead |
delete() | Use AmitySocialClient.newCommentRepository().softDeleteComment() or AmitySocialClient.newCommentRepository().hardDeleteComment() instead |
edit() | AmitySocialClient.newCommentRepository().updateComment() instead |
getReactions() | Use AmityCoreClient.newReactionRepository().getReactions() instead |
react() | Use AmityCoreClient.newReactionRepository().addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead |
getReactions() | Use AmityCoreClient.newReactionRepository().getReactions() instead |
review() | Use AmitySocialClient.newPostRepository().approvePost() or AmitySocialClient.newPostRepository().declinePost() instead |
react() | Use AmityCoreClient.newReactionRepository.()addReaction() or AmityCoreClient.newReactionRepository().removeReaction() instead |
report() | Use AmitySocialClient.newPostRepository().flagPost() or AmitySocialClient.newPostRepository().unflagPost() instead |
delete() | Use AmitySocialClient.newPostRepository().softDeletePost() or AmitySocialClient.newPostRepository().hardDeletePost() instead |
edit() | AmitySocialClient.newPostRepository().updatePost() instead |
getFeedType() | Use getReviewStatus() instead |
relationship().me().getFollowInfo() | Use AmityCoreClient.newUserRepository().relationship().getMyFollowInfo() instead |
relationship().me().getFollowers() | Use AmityCoreClient.newUserRepository().relationship().getMyFollowers() instead
List of followers query can be filtered by AmityReviewStatus |
relationship().me().getFollowings() | Use AmityCoreClient.newUserRepository().relationship().getMyFollowings() instead |
relationship().me().accept() | Use AmityCoreClient.newUserRepository().relationship().acceptMyFollower() instead |
relationship().me().decline() | Use AmityCoreClient.newUserRepository().relationship().declineMyFollower() instead |
relationship().me().unfollow() | Use AmityCoreClient.newUserRepository().relationship().unfollow() instead |
relationship().me().removeFollower() | Use AmityCoreClient.newUserRepository().relationship().removeMyFollower() instead |
relationship().user().getFollowInfo() | Use AmityCoreClient.newUserRepository().relationship().getFollowInfo() instead |
relationship().user().getFollowers() | Use AmityCoreClient.newUserRepository().relationship().getFollowers() instead |
relationship().user().getFollowings() | Use AmityCoreClient.newUserRepository().relationship().getFollowings() instead |
relationship().user().follow() | Use AmityCoreClient.newUserRepository().relationship().follow() instead |
AmityFeedType | Use AmityReviewStatus instead |
muteChannel() | Use AmityChatClient.newChannelRepository().muteChannel() instead |
unmuteChannel() | AmityChatClient.newChannelRepository().unmuteChannel() instead |
updateUser() | Use editUser() instead |
searchUserByDisplayname() | Use searchUsers() instead |
updateComment() | Use editComment() instead |
updateCommunity() | Use editCommunity() instead |
addMembers() | Use AmitySocialClient.newCommunityRepository().membership().addMembers() instead |
removeMembers() | Use AmitySocialClient.newCommunityRepository().membership().removeMembers() instead |
voll() | Use AmitySocialClient.newPollRepository().votePoll() instead |
updatePost() | Use editPost() instead |
updateCustomPost() | Use editCustomPost() instead |
observeStream() | Use getStream() instead |
createVideoStream() | Use createStream() instead |
updateChannel() | Use editChannel() instead |
createMessage() | Use createTextMessage() or createImageMessage() or createFileMessage() or createVideoMessage() or createAudioMessage() or createCustomMessage() instead |
delete() | Use AmityChatClient.newMessageRepostiory().softDeleteMessage() instead |
edit() | Use AmityChatClient.newMessageRepostiory().editTextMessage() instead |
edit() | Use AmityChatClient.newMessageRepostiory().editCustomMessage() instead |
flag() | Use AmityChatClient.newMessageRepostiory().flagMessage() instead |
unflag() | Use AmityChatClient.newMessageRepostiory().unflagMessage() instead |
deleteSubChannel() | Use softDeleteSubChannel() or hardDeleteSubChannel() instead |
updateSubChannel() | Use editSubChannel() instead |
createPost() | Use createTextPost() or createImagePost() or createFilePost() or createVideoPost() or createPollPost() or createLiveStreamPost() instead |
StreamRepository.queryStreams() | Use StreamRepository.getStreams() instead |
StreamRepository.getStream() | Use StreamRepository.getStreamById() instead |
CommunityRepository.getTopTrendingCommunities() | Use CommunityRepository.getTrendingCommunity() instead |
| Removed | use |
| Removed | Use |
| Removed | Override |
| Removed | Override |
| Removed | Use |
| Removed | Use |
count() | count() |
|
|
|
|
| Removed | Use |
| Removed | Use |
AmityRegionalEndpoint | Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
totalUnreadCount: | Removed | New property |
| Renamed | Use AmityChannelBuilder instead. |
|
| Class is changed to Enum |
| Renamed → |
| Renamed → |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Renamed → createdAt |
| Renamed → editedAt |
flagCount: | flagCount: |
|
|
readByCount: | readByCount: |
childrenNumber: | childrenNumber: |
channelSegment: | channelSegment: |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Removed | Use |
| Changed | Parameter |
childrenPosts: | childrenPosts: | property is Non-optional |
| Removed | Use |
| Removed | Use |
| Removed | Use |
commentsCount: | commentsCount: |
flagCount: | flagCount: |
reactionsCount: | reactionsCount: |
sharedCount: | sharedCount: |
| Renamed | Use |
| Renamed | Use |
voteCount: | voteCount: |
closedIn: | closedIn: |
voteCount: | voteCount: |
| Renamed |
|
| Renamed |
|
| Renamed |
|
| Renamed |
|
| Renamed |
|
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use equivalent method from |
| Removed | Use |
| Removed | Use |
| Removed |
|
| Removed |
|
| Removed |
|
| Removed |
|
| Removed | Use |
postsCount: | postsCount: |
membersCount: | membersCount: |
| Removed | Use new method |
| Removed | Use new method |
flagCount: | flagCount: |
childrenNumber: | childrenNumber: |
reactionsCount: | reactionsCount: |
flagCount: | flagCount: |
| Renamed → |
| Removed | Use |
| Removed | Use |
This guide is to provide information about breaking changes and how to migrate to the AmitySDK Web 5.0.0 version.
Following the recent changes with Amity Social Cloud, the Web SDK is now published under a different name.
To install the new v5 version, you will have to run the following commands:
After that, you'll have to change your imports accordingly. You can easily do this by performing a global "search and replace" and put eko-sdk
as input and @amityco/js-sdk
as output. You should end up with a diff looking like this:
After that, we also renamed the sets of constants for consistency.
Don't worry, we didn't change much! Only errors and constants were impacted since we used to prefix them. Aside from this, we did not introduce any change in SDK's logic.
If you are looking for a quick win which will fit 90% of the projects, we recommend you to perform a quick "search and replace" and erase the "Eko" prefix from your code wherever you used it. That is that simple!
For the most precautious, here's an exhaustive list of the names we changed.
The main object you'll interact with is our SDK Client. This class can be freely renamed since it is the default export of our package (ie: import EkoClient from "eko-sdk"
) so there should be no problem keeping it like this if you prefer.
In the eventuality that you'd like to keep the name we gave in the source code, please find that we rename the class to ASCClient
.
Globally found, there will be no need to adapt your code except if you specifically added try catch blocks for those error classes.
All these can be found as named exports at the root of our package (ie: import { EkoFileType } from "eko-sdk"
). You will have to manually change those.
In case you're already using any of those names in your own codebase, you can easily manage by renaming the named imports with the as
keyword.
Old names (v4)
New names (v5)
EkoClient
ASCClient
Old names (v4)
New names (v5)
EkoSDKError
ASCError
EkoSDKConnectionError
ASCSDKConnectionError
EkoSDKInvalidParameterError
ASCSDKInvalidParameterError
Old names (v4)
New names (v5)
EkoConnectionStatus
ConnectionStatus
EkoErrorCode
ErrorCode
Old names (v4)
New names (v5)
EkoDataStatus
DataStatus
EkoLoadingStatus
LoadingStatus
Old names (v4)
New names (v5)
EkoUserSortingMethod
UserSortingMethod
Old names (v4)
New names (v5)
EkoFileType
FileType
EkoImageSize
ImageSize
Old names (v4)
New names (v5)
EkoReactionReferenceType
ReactionReferenceType
EkoReactionEventType
ReactionEventType
Old names (v4)
New names (v5)
EkoChannelType
ChannelType
EkoChannelMembership
ChannelMembership
EkoMemberFilter
MemberFilter
Old names (v4)
New names (v5)
EkoMessageType
MessageType
EkoSyncState
SyncState
Old names (v4)
New names (v5)
EkoCommunityFilter
CommunityFilter
EkoCommunitySortingMethod
CommunitySortingMethod
EkoCommunityUserFilter
CommunityUserFilter
EkoCommunityUserMembership
CommunityUserMembership
EkoCommunityUserSortingMethod
CommunityUserSortingMethod
EkoCommunityCategorySortingMethod
CommunityCategorySortingMethod
Old names (v4)
New names (v5)
EkoPostTargetType
PostTargetType
EkoPostDataType
PostDataType
EkoPostSortingMethod
PostSortingMethod
Old names (v4)
New names (v5)
EkoCommentReferenceType
CommentReferenceType
EkoCommentDataType
CommentDataType
EkoCommentSortingMethod
CommentSortingMethod
createImageMessage(subChannelId: String, imageUri: Uri)
Use createImageMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createVideoMessage(subChannelId: String, videoUri: Uri)
Use createVideoMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createFileMessage(subChannelId: String, fileUri: Uri)
Use createFileMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
createAudioMessage(subChannelId: String, audioUri: Uri)
Use createAudioMessage(subChannelId: String, attachment: AmityMessageAttachment) instead
follow()
Use AmityCoreClient.newUserRepository().relationship().follow() instead
unfollow()
Use AmityCoreClient.newUserRepository().relationship().unfollow() instead
getFollowings()
Use AmityCoreClient.newUserRepository().relationship().getFollowings() instead
getFollowers()
Use AmityCoreClient.newUserRepository().relationship().getFollowers() instead
getFollowInfo()
Use AmityCoreClient.newUserRepository().relationship().getFollowInfo() instead
accept()
Use AmityCoreClient.newUserRepository().relationship().acceptMyFollower() instead
decline()
Use AmityCoreClient.newUserRepository().relationship().declineMyFollower() instead
removeFollower()
Use AmityCoreClient.newUserRepository().relationship().removeMyFollower() instead
unfollow()
Use AmityCoreClient.newUserRepository().relationship().unfollow() instead
getFollowings()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowings() instead
getFollowers()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowers() instead
getFollowInfo()
Use AmityCoreClient.newUserRepository().relationship().getMyFollowInfo() instead
me()
Use AmityCoreClient.newUserRepository().relationship() instead
user()
Use AmityCoreClient.newUserRepository().relationship() instead
getTotalUnreadCount
getTotalUnreadCount on Amity.Client
This guide is to provide information about breaking changes and how to migrate to the Amity TS SDK 6.0.0 version.
npm i @amityco/ts-sdk@^6.0.0
yarn add @amityco/ts-sdk@^6.0.0
Starting from 6.0.0
we recommend to use API's async
hronously. As it will soon be deprecated. Example:
The real time events are supported via MQTT, which has a crucial difference in how it works compared to web sockets. This is, events are not broadcast-ed to all users. So this means that you only get real time event updates to those topics that you subscribe to.
Note: Some exceptions to this are message events and smart feed events. If you are unsure if subscription is required for a particular topic, check the code-snippet for that particular API for details.
There are also other limitations to getting RTE's, example: you cannot subscribe to events for a community that you are not a member of. Check documentation for full details.
You can read more about MQTT here: https://mqtt.org/
Although live objects were introduced prior to v6. All getter methods for singular objects (example getPost
) will now return a subscribe-able object.
This means that if an object gets updated and you have subscribed to real time events, the object will get updated automatically via real time events.
If for your use case you don't require any real time updates, you can unsubscribe immediately. For further information about Live Object, please visit #live-object page.
Although live collections were introduced prior to v6. All query methods for collection of objects (example getPosts
) will now return a subscribe-able collection.
This means that if an object in the collection gets updated and you have subscribed to real time events, the collection will get updated automatically via real time events.
If for your use case you don't require any real time updates, you can unsubscribe immediately. Similar to live objects above. For further information about Live Object, please visit #live-collection page.
Starting from 6.0.0
, you will no longer be able to import individual SDK API's. You'll need to import the required API from it's respective Repositories.
Client
import { Client } from '@amityco/ts-sdk
import { UserRepository } from '@amityco/ts-sdk
import { FileRepository } from '@amityco/ts-sdk
import { ReactionRepository } from '@amityco/ts-sdk
import { CommunityRepository } from '@amityco/ts-sdk
import { StreamRepository } from '@amityco/ts-sdk
import { PostRepository } from '@amityco/ts-sdk
import { CommentRepository } from '@amityco/ts-sdk
import { PollRepository } from '@amityco/ts-sdk
import { ChannelRepository } from '@amityco/ts-sdk
import { MessageRepository } from '@amityco/ts-sdk
Method | Changed To |
---|---|
Method | Changed To | Type |
---|---|---|
Method | Changed To |
---|---|
Method | Changed To | Type |
---|---|---|
Method | Changed To | Type |
---|---|---|
Method | Changed To |
---|---|
Method | Changed To | Type |
---|---|---|
Method | Changed To | Type |
---|---|---|
Method | Changed To |
---|---|
Method | ChangedTo | Type |
---|---|---|
Method | Changed To | Type |
---|---|---|
createClient
Client.createClient
connectClient
Client.login
disconnectClient
Client.logout
subscribeTopic
Client.SubscribeTopic
liveUser
UserRepository.getUser
Live Object
liveUsers
UserRepository.getUsers
Live Collection
updateUser
UserRepository.updateUser
createReport
UserRepository.flagUser
deleteReport
UserRepository.unFlagUser
liveFollowers
UserRepository.Relationship.getFollowers
Live Collection
liveFollowings
UserRepository.Relationship.getFollowings
Live Collection
liveFollowInfo
UserRepository.Relationship.getFollowInfo
Live Object
acceptFollower
UserRepository.Relationship.acceptFollower
declineFollower
UserRepository.Relationship.declineFollower
follow
UserRepository.Relationship.follow
unfollow
UserRepository.Relationship.unfollow
getFile
FileRepository.getFile
deleteFile
FileRepository.deleteFile
queryReactions
ReactionRepository.getReactions
Live Collection
addReaction
ReactionRepository.addReaction
removeReaction
ReactionRepository.removeReaction
createCommunity
CommunityRepository.createCommunity
joinCommunity
CommunityRepository.joinCommunity
leaveCommunity
CommunityRepository.leaveCommunity
liveCommunity
CommunityRepository.getCommunity
Live Object
liveCommunities
CommunityRepository.getCommunities
Live Collection
updateCommunity
CommunityRepository.updateCommunity
liveCommunityMembers
CommunityRepository.Membership.getMembers
Live Collection
addCommunityMembers
CommunityRepository.Membership.addMembers
removeCommunityMembers
CommunityRepository.Membership.removeMembers
addCommunityMemberRoles
CommunityRepository.Membership.addRoles
removeCommunityMemberRoles
CommunityRepository.Membership.removeRoles
liveCategories
CommunityRepository.getCategories
Live Collection
deleteCommunity
CommunityRepository.deleteCommunity
getRecommendedCommunities
CommunityRepository.getRecommendedCommunities
getTopTrendingCommunities
CommunityRepository.getTopTrendingCommunities
getStream
StreamRepository.getStream
queryStreams
StreamRepository.getStreams
createStream
StreamRepository.createStream
createPost
PostRepository.createPost
updatePost
PostRepository.updatePost
deletePost
PostRepository.deletePost
livePost
PostRepository.getPost
Live Object
livePosts
PostRepository.getPosts
Live Collection
approvePost
PostRepository.approvePost
declinePost
PostRepository.declinePost
createComment
CommentRepository.createComment
updateComment
CommentRepository.updateComment
deleteComment
CommentRepository.deleteComment
liveComment
CommentRepository.getComment
Live Object
liveComments
CommentRepository.getComments
Live Collection
createPoll
PollRepository.createPoll
closePoll
PollRepository.closePoll
getPoll
PollRepository.getPoll
votePoll
PollRepository.votePoll
deletePoll
PollRepository.deletePoll
createChannel
ChannelRepository.createChannel
liveChannel
ChannelRepository.getChannel
Live Object
liveChannels
ChannelRepository.getChannels
Live Collection
joinChannel
ChannelRepository.joinChannel
leaveChannel
ChannelRepository.leaveChannel
addChannelMembers
ChannelRepository.Membership.addMembers
removeChannelMembers
ChannelRepository.Membership.removeMembers
getChannelMembers
ChannelRepository.Membership.getMembers
Live Collection
createMessage
MessageRepository.createMessage
updateMessage
MessageRepository.updateMessage
deleteMessage
MessageRepository.deleteMessage
liveMessage
MessageRepository.getMessage
Live Object
liveMessages
MessageRepository.getMessages
Live Collection