summaryrefslogtreecommitdiffstats
path: root/README.mkd
diff options
context:
space:
mode:
Diffstat (limited to 'README.mkd')
-rw-r--r--README.mkd21
1 files changed, 4 insertions, 17 deletions
diff --git a/README.mkd b/README.mkd
index ba370b5..0c2bafc 100644
--- a/README.mkd
+++ b/README.mkd
@@ -2,27 +2,14 @@
This gem is a high level wrapper around Evernote's Thrift-generated ruby code. It bundles up Evernote's thrift-generated code and creates some simple wrapper classes.
# usage #
-Create a config yml:
-
- sandbox:
- username: user
- password: password
- consumer_key: key
- consumer_secret: secret
-
- production:
- username: user
- password: password
- consumer_key: key
- consumer_secret: secret
-
-Here's an example using the sandbox key:
+Get yourself an API key from Evernote, which gives you a "consumer_key" and "consumer_secret". Put those in a YML file or any other place you put configuration information. Also, get yourself a username and password (probably on their sandbox system).
+
require 'evernote'
user_store_url = "https://sandbox.evernote.com/edam/user"
- config = File.dirname(__FILE__) + "/config.yml"
- user_store = Evernote::UserStore.new(user_store_url, config, "sandbox")
+ config={'username'=>'YOUR_USERNAME','password'=>'YOUR_PASSWORD','consumer_key'=>'YOUR_CONSUMER_KEY_FROM_EVERNOTE','consumer_secret'=>'YOUR_CONSUMER_SECRECT_FROM_EVERNOTE'}
+ user_store = Evernote::UserStore.new(user_store_url, config)
auth_result = user_store.authenticate
user = auth_result.user