Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change some confusing part of the document #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Prerequisites
-------------
In order to use the code in this SDK, you need to obtain an API key from http://dev.evernote.com/documentation/cloud. You'll also find full API documentation on that page.

In order to run the sample code, you need a user account on the sandbox service where you will do your development. Sign up for an account at https://sandbox.evernote.com/Registration.action
In order to run the sample code, you need a user account on the sandbox service where you will do your development. Sign up for an account at https://sandbox.evernote.com/Registration.action

In order to run the client client sample code, you need a developer token. Get one at https://sandbox.evernote.com/api/DeveloperToken.action

Expand Down Expand Up @@ -42,9 +42,18 @@ request_token = client.request_token(:oauth_callback => 'YOUR CALLBACK URL')
request_token.authorize_url
=> https://sandbox.evernote.com/OAuth.action?oauth_token=OAUTH_TOKEN
```
**Notice**: On rail, You should save your `token` and `secret` here
```ruby
session[:request_token] = request_token.token
session[:request_secret] = request_token.secret
```

To obtain the access token
```ruby
access_token = request_token.get_access_token(oauth_verifier: params[:oauth_verifier])
access_token = client.authorize(
session[:request_token],
session[:request_secret],
params[:oauth_verifier]))
```
Now you can make other API calls
```ruby
Expand Down