SubscriptionListEditor

SubscriptionListEditor

An interface for editing subscription list membership.

Example

const channel = await sdk.getChannel()
const editor = channel.subscriptions.edit()
await editor
  .subscribe("cool_list")
  .unsubscribe("uncool_list")
  .apply()

Methods

apply() → {Promise.<void>}

Applies any previously queued changes.

Returns:
  • resolves if changes were applied successfully.

  • Type:
    Promise.<void>

subscribe(listId) → {SubscriptionListEditor}

Queue a list subscribe operation.

Parameters:
Name Type Description
listId string

the id of the list

Returns:
Type:
SubscriptionListEditor

unsubscribe(listId) → {SubscriptionListEditor}

Queue a list unsubscribe operation.

Parameters:
Name Type Description
listId string

the id of the list

Returns:
Type:
SubscriptionListEditor