-
public interface BookmarkListA class that manages a paginated list of bookmarks.
BookmarkList provides functionality to query and paginate through bookmarks. It maintains the current state of the bookmark list and provides methods to load more bookmarks when available.
val query = BookmarksQuery() val bookmarkList = feedsClient.bookmarkList(query) // Fetch initial bookmarks matching the query val bookmarks = bookmarkList.get() // Load more bookmarks if available if (bookmarkList.state.canLoadMore) { val moreBookmarks = bookmarkList.queryMoreBookmarks() } // Observe state changes bookmarkList.state.bookmarks.collect { bookmarks -> println("Updated bookmarks: ${bookmarks.size}") }
-
-
Method Summary
Modifier and Type Method Description abstract Result<List<BookmarkData>>get()Fetches the current list of bookmarks. abstract Result<List<BookmarkData>>queryMoreBookmarks(Integer limit)Queries more bookmarks based on the current pagination state. abstract BookmarksQuerygetQuery()The query used to fetch the bookmarks. abstract BookmarkListStategetState()An observable object representing the current state of the bookmark list. -
-
Method Detail
-
get
abstract Result<List<BookmarkData>> get()
Fetches the current list of bookmarks.
-
queryMoreBookmarks
abstract Result<List<BookmarkData>> queryMoreBookmarks(Integer limit)
Queries more bookmarks based on the current pagination state. If there are no more bookmarks available, it returns an empty list.
- Parameters:
limit- The maximum number of bookmarks to return.
-
getQuery
abstract BookmarksQuery getQuery()
The query used to fetch the bookmarks.
-
getState
abstract BookmarkListState getState()
An observable object representing the current state of the bookmark list.
-
-
-
-