我尝试使用 evernote 的 api
https://github.com/cgs/evernote
gem ‘evernote’
申请了各种 key, 然后按照那个例子去做,在执行第一句的时候,就报错了:
user_store_url = "https://sandbox.evernote.com/edam/user"
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)
/Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift-0.8.0/lib/thrift/transport/http_client_transport.rb:47:in `initialize': can't convert nil into String (TypeError)
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift-0.8.0/lib/thrift/transport/http_client_transport.rb:47:in `new'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift-0.8.0/lib/thrift/transport/http_client_transport.rb:47:in `flush'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift-0.8.0/lib/thrift/client.rb:41:in `send_message'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/vendor/gen-rb/evernote/edam/user_store.rb:23:in `send_checkVersion'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/vendor/gen-rb/evernote/edam/user_store.rb:18:in `checkVersion'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift_client-0.8.1/lib/thrift_client/abstract_thrift_client.rb:150:in `handled_proxy'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/thrift_client-0.8.1/lib/thrift_client/abstract_thrift_client.rb:60:in `checkVersion'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/lib/evernote/client.rb:14:in `method_missing'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/lib/evernote/user_store.rb:35:in `method_missing'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/lib/evernote/user_store.rb:43:in `version_valid?'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/lib/evernote/user_store.rb:39:in `validate_version'
from /Users/lukfan/.rvm/gems/ruby-1.9.3-p125/gems/evernote-1.2.1/lib/evernote/user_store.rb:25:in `initialize'
from example.rb:13:in `new'
from example.rb:13:in `<main>'
不解啊,有人玩儿过吗?有办法处理吗?