Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 5ffb9a6280
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (21 sloc) 0.82 kB
require 'rubygems'
require 'evernote'
user_store_url = "https://sandbox.evernote.com/edam/user"
config = {
:username => 'username',
:password => 'password',
:consumer_key => 'consumer_key',
:consumer_secret => 'consumer_secret'
}
user_store = Evernote::UserStore.new(user_store_url, config)
auth_result = user_store.authenticate
user = auth_result.user
auth_token = auth_result.authenticationToken
puts "Authentication was successful for #{user.username}"
puts "Authentication token = #{auth_token}"
note_store_url = "http://sandbox.evernote.com/edam/note/#{user.shardId}"
note_store = Evernote::NoteStore.new(note_store_url)
notebooks = note_store.listNotebooks(auth_token)
puts "Found #{notebooks.size} notebooks:"
default_notebook = notebooks[0]
notebooks.each { |notebook| puts " * #{notebook.name}"}
Jump to Line
Something went wrong with that request. Please try again.