The following are methods for Topics. All methods are static.
29.0
No
public static ConnectApi.Topic assignTopic(String communityId, String recordId, String topicId)
Type: ConnectApi.Topic
29.0
No
public static ConnectApi.Topic assignTopicByName(String communityId, String recordId, String topicName)
Type: ConnectApi.Topic
36.0
No
public static ConnectApi.Topic createTopic(String communityId, String name, String description)
Type: ConnectApi.Topic
40.0
No
public static ConnectApi.TopicPage createTopicDataCategoryRules(String communityId, String dataCategoryGroup, String dataCategory, ConnectApi.TopicNamesInput topicNames)
Type: ConnectApi.TopicPage
29.0
No
public static Void deleteTopic(String communityId, String topicId)
Type: Void
Topic deletion is asynchronous. If a topic is requested before the deletion completes, the response is successful and the isBeingDeleted property of ConnectApi.Topic is true in version 33.0 and later. If a topic is requested after the deletion completes, the response is ConnectApi.NotFoundException.
29.0
32.0
Yes
public static ConnectApi.ChatterGroupSummaryPage getGroupsRecentlyTalkingAboutTopic(String communityId, String topicId)
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
32.0
Yes
public static ConnectApi.TopicPage getRecentlyTalkingAboutTopicsForGroup(String communityId, String groupId)
Type: ConnectApi.TopicPage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
32.0
Yes
public static ConnectApi.TopicPage getRecentlyTalkingAboutTopicsForUser(String communityId, String userId)
Type: ConnectApi.TopicPage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
Two topics that are assigned to the same feed item at least three times are related.
29.0
32.0
No
public static ConnectApi.TopicPage getRelatedTopics(String communityId, String topicId)
Type: ConnectApi.TopicPage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
32.0
No
public static ConnectApi.Topic getTopic(String communityId, String topicId)
Type: ConnectApi.Topic
40.0
No
public static ConnectApi.TopicPage getTopicDataCategoryRules(String communityId, String dataCategoryGroup, String dataCategory)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, String recordId)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, ConnectApi.TopicSort sortParam)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, Integer pageParam, Integer pageSize)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, Integer pageParam, Integer pageSize, ConnectApi.TopicSort sortParam)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, String q, ConnectApi.TopicSort sortParam)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, String q, Integer pageParam, Integer pageSize)
Type: ConnectApi.TopicPage
29.0
32.0
No
public static ConnectApi.TopicPage getTopics(String communityId, String q, Integer pageParam, Integer pageSize, ConnectApi.TopicSort sortParam)
Type: ConnectApi.TopicPage
33.0
33.0
No
public static ConnectApi.TopicPage getTopics(String communityId, String q, Boolean exactMatch)
Type: ConnectApi.TopicPage
35.0
35.0
No
public static ConnectApi.TopicPage getTopicsOrFallBackToRenamedTopics(String communityId, String q, Boolean exactMatch, Boolean fallBackToRenamedTopics)
Type: ConnectApi.TopicPage
29.0
No
public static ConnectApi.TopicSuggestionPage getTopicSuggestions(String communityId, String recordId, Integer maxResults)
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
No
public static ConnectApi.TopicSuggestionPage getTopicSuggestions(String communityId, String recordId)
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
No
public static ConnectApi.TopicSuggestionPage getTopicSuggestionsForText(String communityId, String text, Integer maxResults)
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
No
public static ConnectApi.TopicSuggestionPage getTopicSuggestionsForText(String communityId, String text)
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
32.0
No
public static ConnectApi.TopicPage getTrendingTopics(String communityId)
Type: ConnectApi.TopicPage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
29.0
32.0
No
public static ConnectApi.TopicPage getTrendingTopics(String communityId, Integer maxResults)
Type: ConnectApi.TopicPage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). Use the set test method with the same parameters or the code throws an exception.
33.0
No
public static ConnectApi.Topic mergeTopics(String communityId, String topicId, List<String> idsToMerge)
Type: ConnectApi.Topic
40.0
No
public static ConnectApi.TopicPage reassignTopicDataCategoryRules(String communityId, String dataCategoryGroup, String dataCategory, ConnectApi.TopicNamesInput topicNames)
Type: ConnectApi.TopicPage
35.0
No
public static ConnectApi.TopicPage reassignTopicsByName(String communityId, String recordId, ConnectApi.TopicNamesInput topicNames)
Type: ConnectApi.TopicPage
29.0
No
public static Void unassignTopic(String communityId, String recordId, String topicId)
Type: Void
29.0
No
public static ConnectApi.Topic updateTopic(String communityId, String topicId, ConnectApi.TopicInput topic)
Type: ConnectApi.Topic
40.0
No
public static ConnectApi.TopicPage updateTopicsForArticlesInDataCategory(String communityId, String dataCategoryGroup, String dataCategory, ConnectApi.ArticleTopicAssignmentJobInput articleTopicAssignmentJob)
Type: ConnectApi.TopicPage
The following are the test methods for Topics. All methods are static.
For information about using these methods to test your ConnectApi code, see Testing ConnectApi Code.
29.0
public static Void setTestGetGroupsRecentlyTalkingAboutTopic(String communityId, String topicId, ConnectApi.ChatterGroupSummaryPage result)
Type: Void
29.0
public static Void setTestGetRecentlyTalkingAboutTopicsForGroup(String communityId, String groupId, ConnectApi.TopicPage result)
Type: Void
29.0
public static Void setTestGetRecentlyTalkingAboutTopicsForUser(String communityId, String userId, ConnectApi.TopicPage result)
Type: Void
29.0
public static Void setTestGetRelatedTopics(String communityId, String topicId, ConnectApi.TopicPage result)
Type: Void
29.0
public static Void setTestGetTopicSuggestions(String communityId, String recordId, Integer maxResults, ConnectApi.TopicSuggestionPage result)
Type: Void
29.0
public static Void setTestGetTopicSuggestions(String communityId, String recordId, ConnectApi.TopicSuggestionPage result)
Type: Void
29.0
public static Void setTestGetTopicSuggestionsForText(String communityId, String text, Integer maxResults, ConnectApi.TopicSuggestionPage result)
Type: Void
29.0
public static Void setTestGetTopicSuggestionsForText(String communityId, String text, ConnectApi.TopicSuggestionPage result)
Type: Void
29.0
public static Void setTestGetTrendingTopics(String communityId, ConnectApi.TopicPage result)
Type: Void
29.0
public static Void setTestGetTrendingTopics(String communityId, Integer maxResults, ConnectApi.TopicPage result)
Type: Void