An interface for editing scoped subscription list membership.
Example
const contact = await sdk.contact()
const editor = contact.subscriptions.edit()
await editor
.subscribe("cool_list", "app")
.unsubscribe("uncool_list", "web")
.apply()
Methods
apply() → {Promise.<void>}
Applies any previously queued changes.
Returns:
-
resolves if changes were applied successfully.
-
- Type:
-
Promise.<void>
subscribe(listId, scope) → {ScopedSubscriptionListEditor}
Queue a list subscribe operation.
Parameters:
Name | Type | Description |
---|---|---|
listId |
string
|
the id of the list |
scope |
Scope
|
a scope to subscribe to |
Returns:
unsubscribe(listId, scope) → {ScopedSubscriptionListEditor}
Queue a list unsubscribe operation.
Parameters:
Name | Type | Description |
---|---|---|
listId |
string
|
the id of the list |
scope |
Scope
|
a scope to unsubscribe from |