getBrowseGroups

fun getBrowseGroups(groupId: String? = null, groupsMaxDepth: Int? = null): Observable<ConstructorData<BrowseGroupsResponse>>

Returns a list of browse groups results.

Example:

ConstructorIo.getBrowseGroups("Brand", 5)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it.onValue {
it.response?.let {
view.renderData(it)
}
}
}

Parameters

groupId

id of the specific group to be included in the response

groupsMaxDepth

maximum depth of group hierarchy to be included in response


fun getBrowseGroups(request: BrowseGroupsRequest): Observable<ConstructorData<BrowseGroupsResponse>>

Returns a list of browse groups results utilizing a request object.

Example:

val request = BrowseGroupsRequest.Builder()
.setGroupId("Brand")
.setGroupsMaxDepth(5)
.build()

ConstructorIo.getBrowseGroups(request)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
it.onValue {
it?.let {
view.renderData(it)
}
}
}

Parameters

request

the browse groups request object