From 9ac75df9c16219be20c0c6e136ecf1948b5472dd Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Mon, 8 Jul 2024 14:44:39 +0530 Subject: [PATCH] Added README section for retrieving connection id, state, recovery key --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index aa2ece68..dda813b4 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,14 @@ client.connection.on do |state_change| end ``` +Retrieve connection id, state etc + +```ruby +connection_id = client.connection.id +state = client.connection.state +recovery_key = client.connection.create_recovery_key # https://ably.com/docs/connect/states?q=recovery#connection-state-recover-options +``` + ### Subscribing to a channel Given a channel is created as follows: