No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
ChatterFavorites Methods
The following are methods for ChatterFavorites. All methods are static.
addFavorite(String, String, String)
API Version
28.0
Signature
public static ConnectApi.FeedFavorite addFavorite(String communityId, String subjectId, String searchText)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- Specify the ID for the context user or the alias me.
- searchText
- Type: String
- Specify the text of the search to be saved as a favorite. This method can only create a feed search favorite, not a list view favorite or a topic.
Return Value
Type: ConnectApi.FeedFavorite
addRecordFavorite(String, String, String)
API Version
28.0
Signature
public static ConnectApi.FeedFavorite addRecordFavorite(String communityId, String subjectId, String targetId)
Parameters
Return Value
Type: ConnectApi.FeedFavorite
deleteFavorite(String, String, String)
API Version
28.0
Signature
public static Void deleteFavorite(String communityId, String subjectId, String favoriteId)
Parameters
Return Value
Type: Void
getFavorite(String, String, String)
API Version
28.0
Signature
public static ConnectApi.FeedFavorite getFavorite(String communityId, String subjectId, String favoriteId)
Parameters
Return Value
Type: ConnectApi.FeedFavorite
getFavorites(String, String)
API Version
28.0
Signature
public static ConnectApi.FeedFavorites getFavorites(String communityId, String subjectId)
Parameters
Return Value
Type: ConnectApi.FeedFavorites
getFeedItems(String, String, String)
API Version
28.0
Signature
public static ConnectApi.FeedItemPage getFeedItems(String communityId, String subjectId, String favoriteId)
Parameters
Return Value
Type: ConnectApi.FeedItemPage
Usage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). You must use the set test method with the same parameters or the code throws an exception.
getFeedItems(String, String, String, String, Integer, ConnectApi.FeedSortOrder)
API Version
28.0
Signature
public static ConnectApi.FeedItemPage getFeedItems(String communityId, String subjectId, String favoriteId, String pageParam, Integer pageSize, ConnectApi.FeedSortOrder sortParam)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- The ID of the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- pageParam
- Type: String
- The page token to use to view the page. Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default size is 25.
- sortParam
- Type: ConnectApi.FeedSortOrder
- Values are:
- CreatedDateDesc—Sorts the feed items by most recent post date.
- LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
Return Value
Type: ConnectApi.FeedItemPage
Usage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). You must use the set test method with the same parameters or the code throws an exception.
getFeedItems(String, String, String, Integer, String, Integer, FeedSortOrder)
API Version
29.0
Signature
public static ConnectApi.FeedItemPage getFeedItems(String communityId, String subjectId, String favoriteId, Integer recentCommentCount, String pageParam, Integer pageSize, FeedSortOrder sortParam)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- The ID of the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- recentCommentCount
- Type: Integer
- The maximum number of comments to return with each feed item. The default value is 3.
- pageParam
- Type: String
- The page token to use to view the page. Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default size is 25.
- sortParam
- Type: FeedSortOrder
- Values are:
- CreatedDateDesc—Sorts the feed items by most recent post date.
- LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
Return Value
Type: ConnectApi.FeedItemPage
Usage
To test code that uses this method, use the matching set test method (prefix the method name with setTest). You must use the set test method with the same parameters or the code throws an exception.
setTestGetFeedItems(String, String, String, ConnectApi.FeedItemPage)
API Version
28.0
Signature
public static Void setTestGetFeedItems(String communityId, String subjectId, String favoriteId, ConnectApi.FeedItemPage result)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- Specify the ID for the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- result
- Type: ConnectApi.FeedItemPage Class
- The object containing test data.
Return Value
Type: Void
setTestGetFeedItems(String, String, String, String, Integer, FeedSortOrder, ConnectApi.FeedItemPage)
API Version
28.0
Signature
public static Void setTestGetFeedItems(String communityId, String subjectId, String favoriteId, String pageParam, Integer pageSize, FeedSortOrder sortParam, ConnectApi.FeedItemPage result)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- Specify the ID for the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- pageParam
- Type: String
- The page token to use to view the page. Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default size is 25.
- sortParam
- Type: FeedSortOrder
- Values are:
- CreatedDateDesc—Sorts the feed items by most recent post date.
- LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
- result
- Type: ConnectApi.FeedItemPage Class
- The object containing test data.
Return Value
Type: Void
setTestGetFeedItems(String, String, String, Integer, String, Integer, FeedSortOrder, ConnectApi.FeedItemPage)
API Version
29.0
Signature
public static Void setTestGetFeedItems(String communityId, String subjectId, String favoriteId, Integer recentCommentCount, String pageParam, Integer pageSize, FeedSortOrder sortParam, ConnectApi.FeedItemPage result)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- Specify the ID for the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- recentCommentCount
- Type: Integer
- The maximum number of comments to return with each feed item. The default value is 3.
- pageParam
- Type: String
- The page token to use to view the page. Page tokens are returned as part of the response class, for example, currentPageToken or nextPageToken. If you pass in null the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default size is 25.
- sortParam
- Type: FeedSortOrder
- Values are:
- CreatedDateDesc—Sorts the feed items by most recent post date.
- LastModifiedDateDesc—Sorts the feed items by most recent activity, which includes new feed items and comments.
- result
- Type: ConnectApi.FeedItemPage Class
- The object containing test data.
Return Value
Type: Void
updateFavorite(String, String, String, Boolean)
API Version
28.0
Signature
public static ConnectApi.FeedFavorite updateFavorite(String communityId, String subjectId, String favoriteId, Boolean updateLastViewDate)
Parameters
- communityId
- Type: String
- Use either the ID for a community, internal, or null.
- subjectId
- Type: String
- Specify the ID for the context user or the alias me.
- favoriteId
- Type: String
- The ID of a favorite.
- updateLastViewDate
- Type: Boolean
- Specify whether to update the last view date of the specified favorite to the current system time (true) or not (false).
Return Value
Type: ConnectApi.FeedFavorite