communityId
String
channelId
String
userId
String
displayName
String
avatar
Object
description
String
isOfficial
Boolean
isPublic
Boolean
onlyAdminCanPost
Boolean
tags
Array.<String>
metadata
Object
postsCount
Integer
membersCount
Integer
isJoined
Boolean
categoryIds
Array.<String>
isDeleted
Boolean
false
createdAt
String($date-time)
updatedAt
String($date-time)
hasFlaggedPost
Boolean
false
AmityCommunityCreationDataBuilder
instance. The mandatory property is displayName
. You can set other properties as per your necessities.getCommunity(withId:)
method:keyword
parameter allows you to filter communities based on the community displayName
filter
parameter let you filter communities based on the logged-in user membership statuscategoryId
parameters let you filter communities based on community categoriessortBy
parameters let you filter communities based on the order that the communities were created or based on alphabetical orderincludeDeleted
parameters let you specify if you want to include deleted communities in your queryAmityCommunityUpdateDataBuilder
which allows you to set properties that you want to update. Then you can use updateCommunity
method in AmityCommunityRepository
to update the community.deleteCommunity(_:)
method.Note. By default, only the community's original creator or administrators can update/delete the community.
AmityCommunityParticipation
class. It exposes getMembers
method which accepts membershipOptions
and sortBy
parameters.membershipOptions
parameter can have the following filters:membershipOptions
parameter will default to .member
. This means that the result for both sample code below is the same.addMembers(_:)
and removeMembers(_:)
which can be used to add or remove users from the community.AmityCommunityModeration
class provides a way to moderate the community by banning or unbanning users. banMembers(_:)
method accepts an array of user ids to ban and unbanMembers(_:)
accepts an array of user ids to unban. addRoles(_:)
and removeRoles(_:)
method. These functions accept an array of string as an argument that contains the roles that you want to add or remove from a specific user.addRoles(_:)
and removeRoles(_:)
do not create new roles but assign and remove existing roles from given users. You can add or remove default roles as well as custom roles.AmityCommunityRepository
will also be able to manage community categories. When communities are put into a category, you will be able to sort and filter each of the communities in that category. You can access the categories for any communities through categories
property in each AmityCommunity
object.Note: Categories can only be created and updated from Amity Social Cloud Console.
AmityCommunity
model allows user to get post count by feed type .AmityCommunity
model allows user to get status of isPostReviewEnabled
AmityPermission.reviewCommunityPost
by following thisNote. TheisPostReviewEnabled
value ispublished
by default. if you do not call this function, a post of member will be shown on community feed immediately without reviewing.
deleteCommunity
method. It accepts the community ID as the parameter.