-
public interface BookmarkFolderListA class that manages a paginated list of bookmark folders.
BookmarkFolderList provides functionality to query and paginate through bookmark folders. It maintains the current st ate of the bookmark folder list and provides methods to load more folders when available.
val query = BookmarkFoldersQuery() val bookmarkFolderList = feedsClient.bookmarkFolderList(query) // Fetch initial bookmark folders matching the query val bookmarkFolders = bookmarkFolderList.get() // Load more bookmark folders if available if (bookmarkFolderList.state.canLoadMore) { val moreBookmarkFolders = bookmarkFolderList.queryMoreBookmarkFolders() } // Observe state changes bookmarkFolderList.state.folders.collect { folders -> println("Updated bookmark folders: ${folders.size}") }
-
-
Method Summary
Modifier and Type Method Description abstract Result<List<BookmarkFolderData>>get()Retrieves the first page of bookmark folders. abstract Result<List<BookmarkFolderData>>queryMoreBookmarkFolders(Integer limit)Retrieves the next page of bookmark folders based on the current pagination state. abstract BookmarkFoldersQuerygetQuery()The query used to fetch the bookmark folders. abstract BookmarkFolderListStategetState()An observable object representing the current state of the bookmark list. -
-
Method Detail
-
get
abstract Result<List<BookmarkFolderData>> get()
Retrieves the first page of bookmark folders.
-
queryMoreBookmarkFolders
abstract Result<List<BookmarkFolderData>> queryMoreBookmarkFolders(Integer limit)
Retrieves the next page of bookmark folders based on the current pagination state. If there are no more pages available, it returns an empty list.
- Parameters:
limit- The maximum number of bookmark folders to retrieve.
-
getQuery
abstract BookmarkFoldersQuery getQuery()
The query used to fetch the bookmark folders.
-
getState
abstract BookmarkFolderListState getState()
An observable object representing the current state of the bookmark list.
-
-
-
-