Search and filter communities with advanced query capabilities including membership status, categories, and sorting options
Filter Option | Description | Use Case |
---|---|---|
ALL | Shows all available communities | General browsing and discovery |
MEMBER | Shows only communities the user has joined | Managing user’s communities |
NOT_MEMBER | Shows communities the user hasn’t joined | Finding new communities to join |
Sort Option | Description | Best For |
---|---|---|
DISPLAY_NAME | Alphabetical order by community name | Directory-style browsing |
LAST_CREATED | Newest communities first | Discovering fresh content |
FIRST_CREATED | Oldest communities first | Established community discovery |
categoryId
is specified, results are filtered to only include communities belonging to that category.
getCommunities()
method enables users to discover and explore communities with flexible filtering and sorting options. Perfect for building community browsing experiences, onboarding flows, and helping users find relevant communities within your app.
Parameter | Type | Description |
---|---|---|
filter | Enum | Filter by membership status: .all , .member , .notMember (default: .all ) |
sortBy | Enum | Sort order: .displayName , .lastCreated , .firstCreated (default: .lastCreated ) |
categoryId | String | Filter communities by specific category ID |
includeDeleted | Boolean | Include deleted communities in results (default: false ) |
displayName
filter parameter is deprecated. Use the search functionality with keywords for name-based filtering instead.searchCommunities()
method provides keyword-based community search with the same filtering and sorting capabilities as general queries. Ideal for implementing search bars and helping users find specific communities by name or related terms.
Parameter | Type | Description |
---|---|---|
keyword | String | Search term to match against community display names |
filter | Enum | Filter by membership status: .all , .member , .notMember (default: .all ) |
sortBy | Enum | Sort order: .displayName , .lastCreated , .firstCreated (default: .lastCreated ) |
categoryId | String | Filter search results by specific category ID |
includeDeleted | Boolean | Include deleted communities in search results (default: false ) |