Good Reads Paginated Search Results
Wrapper of GoodReadsSearchResult that can be used to fetch more than the results of the first page.
Samples
import ch.derlin.grmetafetcher.GoodReadsLookup
import ch.derlin.grmetafetcher.GoodReadsMetadata
import ch.derlin.grmetafetcher.GoodReadsPaginatedSearchResults
import ch.derlin.grmetafetcher.Retry
import ch.derlin.grmetafetcher.RetryConfiguration
fun main() {
//sampleStart
val paginatedResults: GoodReadsPaginatedSearchResults = GoodReadsLookup("how time war").getMatchesPaginated()
println("Found ${paginatedResults.totalResults} results across ${paginatedResults.totalPages} pages")
println("Showing only first result of all pages...")
println()
while (paginatedResults.hasNext()) {
paginatedResults.next().first().let {
println("page [${paginatedResults.currentPage}] --> \"${it.title}\" by ${it.authorsStr}")
}
}
//sampleEnd
}
See also
Constructors
Functions
Link copied to clipboard
Return all the fetched results so far.
Link copied to clipboard
Fetch the next list of results from the page, also updating the results list.
Properties
Link copied to clipboard
Latest fetched page, 0
if next has never been called.