Sha256: c1f79b7971902e65e1de9b230c3667db1d8997b21a9bcbed38a203677b3b2a3d

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

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}"}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evernote-1.2.1 example.rb
evernote-1.2.0 example.rb
evernote-1.1.0 example.rb