summaryrefslogtreecommitdiffstats
path: root/README.mkd
diff options
context:
space:
mode:
authorPeter Mangiafico2011-04-02 15:13:36 -0700
committerChris Sepic2011-06-28 17:24:00 -0500
commit3c72845c3ffe50bdcba3921a3c51f00331f77a5e (patch)
tree8c6d32fa9925611313b1630db993f9169d3433b7 /README.mkd
parent4a802c59a501cd9a25bedd75bce7ab12f4edf5bc (diff)
downloadevernote-3c72845c3ffe50bdcba3921a3c51f00331f77a5e.tar.bz2
remove need to have configuration parameters in a YML file, allow a generic hash to be passed in instead
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