unsubscribe
This method is to cancel a subscription that was previously created by the subscribe method.
Parameters
Name | Type | Required | Description |
cortexToken |
| yes | A token returned by authorize. |
session |
| yes | A session id returned by createSession. |
streams |
| yes | The data streams you want to unsubscribe to. |
The parameter streams must contain one or more values, chosen from this list: "eeg", "mot", "dev", "pow", "met", "com", "fac", "sys". See Data Subscription for details.
Result
The result is an object that includes these fields:
Name | Type | Description |
success |
| For each stream you successfully unsubscribed to, this array contains an object with the name of the stream. |
failure |
| For each stream you failed to unsubscribed to, this array contains an object that describes the error. |
In case of success, you get an object with these fields:
Name | Type | Description |
streamName |
| The name of the stream. |
In case of failure, you get an object with these fields:
Name | Type | Description |
streamName |
| The name of the stream. |
code |
| The error code. |
message |
| The error message. |
Examples
Unsubscribe successfully from the performance metrics and motion streams.
Last updated