Railsを利用
<参考URL>
Evernote API Reference
http://dev.evernote.com/documentation/reference/NoteStore.html#Fn_NoteStore_findNotes
tokenの取得方法
Gemfile
gem "omniauth-evernote"
gem "evernote_oauth"
session_controller.rb
token = params[:oauth_token]
auth = request.env["omniauth.auth"]
provider = auth["info"]["provider"]
name = auth["info"]["nickname"]
uid = auth["uid"]
(注)sandbox modeでは、下記で取得したtokenを利用する
https://sandbox.evernote.com/api/DeveloperToken.action
notebook listの取得方法
client = EvernoteOAuth::Client.new(token: session[:token])
@note_stores = client.note_store.listNotebooks
note listの取得方法
filter = Evernote::EDAM::NoteStore::NoteFilter.new
filter.notebookGuid = @note_stores.first.guid #先頭のnotebookのguidを指定
@note = client.note_store.findNotes(session[:token], filter, 0, 100) #offset -> 0 , max_size -> 100
note listの表示方法
notes.html.erb
<% @note.notes.each do |n| %>
<%= n.title %>
<% end %>
Evernote guidのフォーマット
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$