README.md in ably-0.7.6 vs README.md in ably-0.8.0
- old
+ new
@@ -1,16 +1,16 @@
-# [Ably](https://ably.io)
+# [Ably](https://www.ably.io)
[](https://travis-ci.org/ably/ably-ruby)
[](http://badge.fury.io/rb/ably)
[](https://coveralls.io/r/ably/ably-ruby)
-A Ruby client library for [ably.io](https://ably.io), the realtime messaging service.
+A Ruby client library for [ably.io](https://www.ably.io), the realtime messaging service.
## Documentation
-Visit https://ably.io/documentation for a complete API reference and more examples.
+Visit https://www.ably.io/documentation for a complete API reference and more examples.
## Installation
The client library is available as a [gem from RubyGems.org](https://rubygems.org/gems/ably).
@@ -39,11 +39,15 @@
```
All examples assume a client has been created as follows:
```ruby
+# basic auth with an API key
client = Ably::Realtime.new(key: 'xxxxx')
+
+# using token auth
+client = Ably::Realtime.new(token: 'xxxxx')
```
### Connection
Successful connection:
@@ -176,22 +180,22 @@
```
### Generate Token and Token Request
```ruby
-client.auth.request_token
-# => #<Ably::Models::Token ...>
+token_details = client.auth.request_token
+# => #<Ably::Models::TokenDetails ...>
+token_details.token # => "xVLyHw.CLchevH3hF....MDh9ZC_Q"
+client = Ably::Rest.new(token: token_details.token)
token = client.auth.create_token_request
# => {"id"=>...,
# "clientId"=>nil,
# "ttl"=>3600,
# "timestamp"=>...,
# "capability"=>"{\"*\":[\"*\"]}",
# "nonce"=>...,
# "mac"=>...}
-
-client = Ably::Rest.new(token_id: token.id)
```
### Fetching your application's stats
```ruby