[英]How to create a note from a chrome extension using the Evernote JavaScript SDK?
The documentation on http://dev.evernote.com/start/core/creating_notes.php states that as a prerequisite I should "[...] have a developer token (or a working OAuth implementation by which [I] retrieve a valid authentication token". I have both of that. Check. http://dev.evernote.com/start/core/creating_notes.php上的文档指出,作为先决条件,我应该“ [...]具有开发人员令牌(或有效的OAuth实施,通过该实施,[I]可以检索有效的身份验证令牌”。我同时拥有两者。请检查。
Next thing they assume is that "[I] have an instance of UserStore and NoteStore". 他们假设的下一件事是“ [I]具有UserStore和NoteStore的实例”。 This is where I'm struggling.
这就是我努力的地方。 I don't have that and I don't know how to get that.
我没有那个,我也不知道如何得到那个。
The code example on the page I linked above is in Python and Objective-C which is not really helpful in my case. 我上面链接的页面上的代码示例是使用Python和Objective-C编写的,对我而言并没有太大帮助。
I am using the Evernote JavaScript SDK ( https://github.com/evernote/evernote-sdk-js ), to be exact the evernote-sdk-minified.js
, but I still can't figure out how to use the Evernote Cloud API ( http://dev.evernote.com/documentation/reference/ ) to create a note from my extension. 我正在使用Evernote JavaScript SDK( https://github.com/evernote/evernote-sdk-js ),确切地说是
evernote-sdk-minified.js
,但我仍然不知道如何使用Evernote使用Cloud API( http://dev.evernote.com/documentation/reference/ )从扩展中创建便笺。
I tried something like 我尝试了类似的东西
var user = UserStore.getUser(auth_token);
but that doesn't seem to work 但这似乎不起作用
If anyone had the same problem and would post some sample code on how to get an instance of UserStore and NoteStore which, supposedly, I need to create a note and maybe even how to create the note itself, I would really appreciate it. 如果有人遇到相同的问题,并且会发布一些示例代码来说明如何获取UserStore和NoteStore的实例,据推测,我需要创建一个注释,甚至可能需要创建注释本身,我将非常感激。
Thanks! 谢谢!
Evernote doesn't allow client side Javascript access to its API due to cross-site scripting concerns. 由于跨站点脚本问题,Evernote不允许客户端Javascript访问其API。
To use the the Evernote Javascript SDK you will need to use PhoneGap like mentioned in another answer, node.js and the Evernote node module (available via npm ) or Apache Cordova . 要使用Evernote Javascript SDK,您将需要使用另一个答案中提到的PhoneGap , node.js和Evernote节点模块 (可通过npm获得 )或Apache Cordova 。
There is also a unofficial node module that can be used to access the Evernote API called Zookeeper . 还有一个非官方的节点模块,可用于访问名为Zookeeper的Evernote API。
The PhoneGap example has some sample code here . PhoneGap示例在此处包含一些示例代码。 You need to create a NoteStore client and call the createNote API.
您需要创建一个NoteStore客户端并调用createNote API。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.