Newer Version Available
Knowledge Class
Namespace
Knowledge Methods
getTopViewedArticlesForTopic(communityId, topicId, maxResults)
API Version
41.0
Available to Guest Users
41.0
Requires Chatter
No
Signature
public static ConnectApi.KnowledgeArticleVersionCollection getTopViewedArticlesForTopic(String communityId, String topicId, Integer maxResults)
Parameters
Return Value
getTrendingArticles(communityId, maxResults)
API Version
36.0
Available to Guest Users
36.0
Requires Chatter
No
Signature
public static ConnectApi.KnowledgeArticleVersionCollection getTrendingArticles(String communityId, Integer maxResults)
Parameters
Return Value
Usage
getTrendingArticlesForTopic(communityId, topicId, maxResults)
API Version
36.0
Available to Guest Users
36.0
Requires Chatter
No
Signature
public static ConnectApi.KnowledgeArticleVersionCollection getTrendingArticlesForTopic(String communityId, String topicId, Integer maxResults)
Parameters
Return Value
Usage
Knowledge Test Methods
For information about using these methods to test your ConnectApi code, see Testing ConnectApi Code.
setTestGetTrendingArticles(communityId, maxResults, result)
API Version
36.0
Signature
public static Void setTestGetTrendingArticles(String communityId, Integer maxResults, ConnectApi.KnowledgeArticleVersionCollection result)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- maxResults
- Type: Integer
- The maximum number of articles returned. Values can be from 0 to 25. Default is 5.
- result
- Type: ConnectApi.KnowledgeArticleVersionCollection
- Object containing test data.
Return Value
Type: Void
setTestGetTrendingArticlesForTopic(communityId, topicId, maxResults, result)
API Version
36.0
Signature
public static Void setTestGetTrendingArticlesForTopic(String communityId, String topicId, Integer maxResults, ConnectApi.KnowledgeArticleVersionCollection result)
Parameters
- communityId
- Type: String
- ID for an Experience Cloud site, internal, or null.
- topicId
- Type: String
- ID of the topic.
- maxResults
- Type: Integer
- The maximum number of articles returned. Values can be from 0 to 25. Default is 5.
- result
- Type: ConnectApi.KnowledgeArticleVersionCollection
- Object containing test data.
Return Value
Type: Void