【问题标题】:Evernote Windows SDK - How do I access the UserStore?Evernote Windows SDK - 我如何访问 UserStore?
【发布时间】:2016-04-13 17:25:51
【问题描述】:

当前使用带有 C# 的 Evernote Windows SDK nuget 包。我能够连接和验证,并且可以访问 NoteStore 数据。但是,我看不到如何访问 UserStore 数据。

为了澄清。我正在寻找此处提到的 UserStore 部分中保存的数据:https://dev.evernote.com/doc/articles/data_structure.php

有什么想法吗?

【问题讨论】:

    标签: c# evernote


    【解决方案1】:

    编辑:原来我错了,你可以使用 UserStore 但你不能对其进行身份验证。所以我们无法获得所有好的信息,但下面是一个适用于我的代码示例,它获取用户名和 shardid(我可以获得的唯一信息)

    String evernoteHost = "www.evernote.com";
    Uri userStoreUrl = new Uri("http://" + evernoteHost + "/edam/user");
    
    // using the Thrift.protocol and Thrift.transport
    TTransport userStoreTransport = new THttpClient(userStoreUrl);
    TProtocol userStoreProtocol = new TBinaryProtocol(userStoreTransport);
    UserStore.Client userStore = new UserStore.Client(userStoreProtocol);
    
    // returns an EDAM type of user
    var evernoteUser = userStore.getUser(authInfo.oauth_token);
    

    根据 Evernote 文档,仅允许内部应用程序通过 UserStore 和我的研究进行身份验证,

    此功能仅适用于 Evernote 的内部应用程序。第三方应用程序必须使用 OAuth 进行身份验证,如 dev.evernote.com 中所述。

    https://dev.evernote.com/doc/reference/UserStore.html#Fn_UserStore_authenticate

    【讨论】:

      猜你喜欢
      • 2017-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多