README.md in rdstation-ruby-client-0.1 vs README.md in rdstation-ruby-client-0.1.1
- old
+ new
@@ -45,9 +45,36 @@
```ruby
rdstation_client = RDStation::Client.new('rdstation_token', 'auth_token')
rdstation_client.change_lead_status(email: 'joe@foo.bar', status: 'won', value: 999)
```
+### Authentication
+
+#### Getting authentication URL
+
+```ruby
+rdstation_authentication = RDStation::Authentication.new('client_id', 'client_secret')
+
+redirect_url = 'https://yourapp.org/auth/callback'
+rdstation_authentication.auth_url(redirect_url)
+```
+
+#### Getting access_token
+
+You will need the code param that is returned from RD Station to your application after the user confirms the access at the authorization dialog.
+
+```ruby
+rdstation_authentication = RDStation::Authentication.new('client_id', 'client_secret')
+rdstation_authentication.authenticate(code_returned_from_rdstation)
+```
+
+#### Updating access_token
+
+```ruby
+rdstation_authentication = RDStation::Authentication.new('client_id', 'client_secret')
+rdstation_authentication.update_access_token('refresh_token')
+```
+
### Contacts
#### Getting a Contact by UUID
Returns data about a specific Contact