简单的C#Evernote API OAuth示例或指南?

有谁知道我在哪里可以找到一个简单的例子C#代码示例? 显然很难找到。

我刚刚开始,得到了我的开发人员密钥。

初始(真正的noob问题/推定) – 可以(应该/必须)我的解决方案是一个Web服务客户端? 我不需要在.Net中安装新的库吗?

基本上,作为测试,我希望能够安全地在私人笔记本中以html的forms呈现单个音符,类似于外部WebSite上的html中的Everfort导出。

提前谢谢了!

您应该首先从http://www.evernote.com/about/developer/api/下载我们的API ZIP。 您将在/ sample / csharp中找到C#客户端示例代码。 此示例代码演示如何使用桌面应用程序中的Evernote API,该应用程序使用用户名和密码进行身份validation。

我不确定你是否有这个工作,但今天早上我正在玩Evernote,OpenAuth和C#,并设法让它全部工作。 我已经整理了一篇博客文章/图书馆,解释了这些经验,并概述了如何使用MVC进行操作 – http://www.shaunmccarthy.com/evernote-oauth-csharp/ – 它使用AsyncOAuth库: https:// github的.com / neuecc / AsyncOAuth

我在AsyncOAuth上写了一个你可能会觉得有用的包装器: https : //github.com/shaunmccarthy/AsyncOAuth.Evernote.Simple

需要注意的一个棘手的事情 – Evernote端点(/ oauth和/OAuth.action)区分大小写

// Download the library from https://github.com/shaunmccarthy/AsyncOAuth.Evernote.Simple // Configure the Authorizer with the URL of the Evernote service, // your key, and your secret. var EvernoteAuthorizer = new EvernoteAuthorizer( "https://sandbox.evernote.com", "slyrp-1234", // Not my real id / secret :) "7acafe123456badb123"); // First of all, get a request token from Evernote - this causes a // webrequest from your server to Evernote. // The callBackUrl is the URL you want the user to return to once // they validate the app var requestToken = EvernoteAuthorizer.GetRequestToken(callBackUrl); // Persist this token, as we are going to redirect the user to // Evernote to Authorize this app Session["RequestToken"] = requestToken; // Generate the Evernote URL that we will redirect the user to in // order to var callForwardUrl = EvernoteAuthorizer.BuildAuthorizeUrl(requestToken); // Redirect the user (eg MVC) return Redirect(callForwardUrl); // ... Once the user authroizes the app, they get redirected to callBackUrl // where we parse the request parameter oauth_validator and finally get // our credentials // null = they didn't authorize us var credentials = EvernoteAuthorizer.ParseAccessToken( Request.QueryString["oauth_verifier"], Session["RequestToken"] as RequestToken); // Example of how to use the credential with Evernote SDK var noteStoreUrl = EvernoteCredentials.NotebookUrl; var noteStoreTransport = new THttpClient(new Uri(noteStoreUrl)); var noteStoreProtocol = new TBinaryProtocol(noteStoreTransport); var noteStore = new NoteStore.Client(noteStoreProtocol); List notebooks = client.listNotebooks(EvernoteCredentials.AuthToken); 

http://weblogs.asp.net/psteele/archive/2010/08/06/edamlibrary-evernote-library-for-c.aspx可能有所帮助。 正如作者所述,它只捆绑了一些并修复了一些。 我自己没试过,但我想提一下可能更容易入手的方法。 有可能。

这可能也有帮助…因为原始博客网站离线,所以使用Way Back Machine发现它。

https://www.evernote.com/pub/bluecockatoo/Evernote_API#b=bb2451c9-b5ff-49bb-9686-2144d984c6ba&n=c30bc4eb-cca4-4a36-ad44-1e255eeb26dd

最初的博文: http : //web.archive.org/web/20090203134615/http : //macrolinz.com/macrolinz/index.php/2008/12/

向下滚动,找到12月26日的post – “在热的时候拿到它……”