Skip to content

Commit

Permalink
Added README section for retrieving connection id, state, recovery key
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jul 8, 2024
1 parent af7ef4e commit 9ac75df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9ac75df

Please sign in to comment.