5

簡単なC#コード例がどこにあるか知っている人はいますか? どうやら見つけるのは本当に難しいようです。

始めたばかりで、開発者キーを取得しました。

最初の (本当に初歩的な質問/推測) - -私のソリューションは Web サービス クライアントになることができますか? .Net にインストールする必要のある新しいライブラリはありませんか?

基本的に、テストとして、html での Everfort エクスポートが外部の Web サイトでどのように見えるかに似ているように、プライベート ノートブックから 1 つのメモを html で安全に表示できるようにしたいと考えています。

よろしくお願いします!

4

4 に答える 4

4

You should start by downloading our API ZIP from http://www.evernote.com/about/developer/api/. You'll find C# client sample code in /sample/csharp. This sample code demonstrates using the Evernote API from a desktop application that authenticates using username and password.

于 2010-12-08T04:47:40.037 に答える
3

これが機能したかどうかはわかりませんが、今朝、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 (e.g. 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<Notebook> notebooks = client.listNotebooks(EvernoteCredentials.AuthToken);
于 2013-09-28T17:39:41.807 に答える
0

これも役立つかもしれません...元のブログサイトがオフラインだったので、WayBackMachineを使用して見つけました。

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日の投稿を見つけてください-「暑いうちに入手してください...」

于 2012-04-11T18:40:29.060 に答える
0

http://weblogs.asp.net/psteele/archive/2010/08/06/edamlibrary-evernote-library-for-c.aspxが役立つ場合があります。著者が述べているように、一部をバンドルして一部を修正するだけです。自分で試したことはありませんが、おそらく簡単に始める方法について言及したいと思います。おそらく。

于 2011-10-12T05:39:35.543 に答える