get Matches Paginated
Get the list of matches for the given search query (see searchUrl), paginated.
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
}
Throws
if no result is found.