-
public interface FeedListRepresents a list of feeds with a query and state.
// Create a feed list val query = FeedsQuery() val feedList = feedsClient.feedList(query) // Fetch initial feeds matching the query val feeds = feedList.get() // Load more feeds if available if (feedList.state.canLoadMore) { val moreFeeds = feedList.queryMoreFeeds() } // Observe state changes feedList.state.feeds.collect { feeds -> println("Updated feeds: ${feeds.size}") }
-
-
Method Summary
Modifier and Type Method Description abstract Result<List<FeedData>>get()Fetches the initial list of feeds based on the current query configuration. abstract Result<List<FeedData>>queryMoreFeeds(Integer limit)Loads the next page of feeds if more are available. abstract FeedsQuerygetQuery()The query used to fetch feeds. abstract FeedListStategetState()An observable object representing the current state of the feed list. -
-
Method Detail
-
get
abstract Result<List<FeedData>> get()
Fetches the initial list of feeds based on the current query configuration. This method loads the first page of feeds according to the query's filters, sorting, and limit parameters.
-
queryMoreFeeds
abstract Result<List<FeedData>> queryMoreFeeds(Integer limit)
Loads the next page of feeds if more are available.
This method fetches additional feeds using the pagination information from the previous request. If no more feeds are available, an empty array is returned.
-
getQuery
abstract FeedsQuery getQuery()
The query used to fetch feeds.
-
getState
abstract FeedListState getState()
An observable object representing the current state of the feed list.
-
-
-
-