new RoonApiBrowse(core)
Your browsing session is maintained on Roon's side, facilitating minimally stateful clients.
## Sessions
In order to facilitate minimally stateful clients and avoid situations where large amounts of data need to be sent at once, the browse session state is maintained on the server (Roon Core) side.
Requests to the browse service accept two arguments:
- `hierarchy` which identifies the hierarchy being browsed
- `multi_session_key`, which enables an extensions to browse multiple instances of the same hierarchy at once. Most applications should not use `multi_session_key`.
Keep in mind when integrating with this API that in most cases, it will be better for the user to remember their last browsing position. In other cases where starting the browse from the toplevel is more appropriate, call the browse method with opts.pop_all set to true
## The Browse Stack
Roon keeps track your browse stack, which consists of one or more _levels_.
Levels are numbered starting from 0 (the top level). The level number increases as the user "drills down".
Parameters:
Name | Type | Description |
---|---|---|
core |
Core | The Core providing the service |
- Source:
Methods
browse(opts, cbopt)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | Options. If none, specify empty object ({}).
Properties
|
|||||||||||||||||||||||||||||||||||||||||
cb |
RoonApiBrowse~browseresultcallback |
<optional> |
Called on success or error |
load(opts, cbopt)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object | Options.
Properties
|
|||||||||||||||||||||||||||||
cb |
RoonApiBrowse~loadresultcallback |
<optional> |
Called on success or error |
Type Definitions
browseresultcallback(error, body)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error |
string | false | an error code or false if no error | ||||||||||||||||||||||||
body |
object |
Properties
|
- Source:
loadresultcallback(error, body)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error |
string | false | an error code or false if no error | ||||||||||||
body |
object |
Properties
|
- Source: