These methods help you display your user community and all associated content on the ASAP help widget.
Users can perform various actions in the community module, including editing and deleting topics and adding, editing, and deleting comments.
The following method helps you define users' actions when accessing the community through the ASAP help widget.
Swift
- ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#>
ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#>
ZDPCommunityConfiguration.isReplyAllowed = <#Bool#>
ZDPCommunityConfiguration.iReplyEditAllowed = <#Bool#>
ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>
Objective-C
- ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#>;
ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#>;
ZDPCommunityConfiguration.isReplyAllowed = <#Bool#>;
ZDPCommunityConfiguration.isReplyEditAllowed = <#Bool#>;
ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>;
Here are some of the parameter keys and the types of values passed in the most popular and most discussed topics.
• categoryId - string - ID of the community category from which the topics must be fetched. If you want to include all categories, pass the value "-1".
• filterType - string - Type of forum topic. Values allowed are QUESTION, IDEA, ANNOUNCEMENT, PROBLEM, and DISCUSSION.
• from - int - Index number, starting from which the topics must be fetched. Value starts from 1.
• limit - int - Number of topics to fetch
• includeCount - Boolean - Parameter that specifies whether the number of topics fetched must be displayed or not
Getting the Most Popular Topics
The following API fetches the forum topics with the most number of likes.
Swift
- ZohoDeskPortalSDK.Community.getMostPopularTopics(<#T##params: [String : Any]?##[String : Any]?#>)
{ topics, error in
// switch on result to get array of topics on success
}
Objective-C
- [ZohoDeskPortalSDKCommunity getMostPopularTopics:
<#(NSDictionary * _Nullable)#> onCompletion:^(NSArray * topics, NSError * error)
{
// on success, topics will return an array, error will return nil
// on failure, error will return a value, topics will return nil
}];
Getting the Most Discussed Topics
The following API fetches the forum topics with the most number of comments.
Swift
- ZohoDeskPortalSDK.Community.getMostDisuccedTopics(<#T##params: [String : Any]?##[String : Any]?#>)
{ topics, error in
// on success, topics will return an array, error will return nil
// on failure, error will return a value, products will return nil
}
Objective-C
- [ZohoDeskPortalSDKCommunity getMostDisuccedTopics:
<#(NSDictionary * _Nullable)#> onCompletion:^(NSArray * topics, NSError * error)
{
// on success, topics will return an array, error will return nil
// on failure, error will return a value, topics will return nil
}];