Skip to content

Commit

Permalink
Update documentation about how to perform the Handshake
Browse files Browse the repository at this point in the history
I've added this update due to a deprecation warning:
`[DEPRECATION] calling '.authorize' with a OAuth::RequestToken is deprecated. Please use a Hash with the keys ':token',':secret' and ':verifier' instead.`
  • Loading branch information
blake-simpson committed Jul 21, 2016
1 parent bf65de5 commit 3c48a9b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Expand Up @@ -30,8 +30,11 @@ puts "Please enter the pin:"
pin = gets.chomp.strip

# Authorize the handshake and get the token and secret
authorized_params = XingApiClient.authorize(request_params[:request_token], pin)
puts authorized_params.inspect # { access_token: 'abcde', secret: '12345' }
authorized_params = XingApiClient.authorize({
token: request_params[:request_token].token,
secret: request_params[:request_token].secret,
verifier: pin
})

# Initialize a client
client = XingApiClient.new(authorized_params[:access_token], authorized_params[:secret])
Expand Down Expand Up @@ -242,5 +245,3 @@ client.request.get_users(id: 'me')
### Geo Locations
- [ ] GET /v1/users/:user_id/nearby_users
- [ ] PUT /v1/users/:user_id/geo_location


0 comments on commit 3c48a9b

Please sign in to comment.