get Browse Results
Returns a list of browse results including filters, categories, sort options, etc.
Example:
ConstructorIo.getBrowseResults("group_id", "Beverages", selectedFacets?.map { it.key to it.value }, 1, perPage = 24)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it.onValue {
it.response?.let {
view.renderData(it)
}
}
}
Parameters
filter name to display results from
filter value to display results from
additional facets used to refine results
the page number of the results
The number of results per page to return
category facet used to refine results
the sort method for results
the sort order for results
the section the results will come from defaults to "Products"
show fields that are hidden by default
show facets that are hidden by default
the sort method for groups
the sort order for groups
specify which attributes within variations should be returned
faceting expression to scope results
additional format options to pass
Returns a list of browse results including filters, categories, sort options, etc. utilizing a request object.
Example:
val filters = mapOf(
"group_id" to listOf("G1234"),
"Brand" to listOf("Cnstrc")
"Color" to listOf("Red", "Blue")
)
val request = BrowseRequest.Builder("group_id", "123")
.setFilters(filters)
.setHiddenFacets(listOf("hidden_facet_1", "hidden_facet_2"))
.build()
ConstructorIo.getBrowseResults(request)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it.onValue {
it?.let {
view.renderData(it)
}
}
}
Parameters
the browse request object