Communities
This page will guide you through the steps you need to take to integrate community chat groups into your applications for Web
Create Community
When creating a new community, first instantiates the CommunnityRepository
, a class that contain all community related methods. Then call createCommunity()
to obtain the LiveObject and observe it in order to obtain the final community model.
Note that the event listener was registered using once()
. Unlike on()
, once()
will automatically unregister the event listener once the first event was emitted. This is useful if you just need to use the model once but do not need to listen to further events.
Get Community
In the case where you only want to fetch communities data without joining, you can use the communityForId()
method:
Join Community
Leave Community
Community Query
There are methods to obtain communities that only match specific criteria:
the
search
parameter let you filter communities based on the communitydisplayName
the
isJoined
parameter let you filter communities based on the logged in user membership statusthe
tags
parameters let you filter communities based on the tags set (or not set) in each communitythe
categories
parameters let you filter communities based on community categoriesthe
sortBy
parameters let you filter communities based on the order that the communities were created or based on alphabetical order
Update Community
If you want to update a community, you can call the following:
Note. By default, only the communities original creator or adminstrators can update the community.
Community Membership
You can get a list of community members by calling the following method:
Community Categories
The CommunityRepository
will also be able to manage community categories. When community are put into a category, you will be able to sort and filter each of the community in that category.
Note. Right now categories will only be creatable and updatable from the admin panel.
Get Category
You can fetch a particular category by calling the categoryForId()
method:
You can also fetch a list of categories:
Category Query
This method provides the ability to obtain all the categories.
Last updated