SDK
SDK C# v2.x
2

UnsubscribeAsync #

Removes a subscription.

Arguments #

public async Task UnsubscribeAsync(string roomId);
ArgumentTypeDescription
room_id
string&
Subscription room ID

Exceptions #

Throws a KuzzleException if there is an error. See how to handle error.

Usage #

NotificationHandler listener = (notification) => {};
try {
  string room_id = await kuzzle.Realtime.SubscribeAsync(
    "nyc-open-data",
    "yellow-taxi",
    new JObject(),
    listener);
  await kuzzle.Realtime.UnsubscribeAsync(room_id);
  Console.WriteLine("Successfully unsubscribed");
} catch (KuzzleException e) {
  Console.WriteLine(e);
}