AmityFeedRepository
class. AmityFeedRepository
lastCreated
or firstCreated
timestamp. AmityUserFeedSortOption
enum provides both sort options which you can provide as argument while fetching feed.AmityFeedRepository
class exposes two convenient methods getMyFeedSortedBy(_:)
and getUserFeed(_:)
to query for your own feed and other user's feed respectively. getUserFeed(_:)
method requires an additional parameter userId
.communityId
. Fetching more posts for Group Feed is the same as User Feed. getGlobalFeed
method or the getCustomPostRankingGlobalFeed
method. getGlobalFeed
If you query posts using this method, the post will be returned in chronological order. Below is the sample code.getCustomPostRankingGlobalFeed
Query custom post ranking is a smarter global feed that supports a score-sorting mechanism. Refer to Custom Post Ranking for more information about this feature.
You can retrieve your global feed sorted by ranking score by calling the following method.