跳轉到內容

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

圖片

UserStore example


  • 請登入才能回覆
這個主題有1篇回覆

#1 JMG

JMG

  • 圓點圖片
  • Title: Member
  • Group: Members
  • 8 篇 文章總計

發表於 16 June 2009 - 08:06 AM

Hi!

Is there an example somewhere on how to use the UserStore module to collect information about the user (ie the username)?

Regards
JMG

#2 engberg

engberg

  • Title: Evernote Employee
  • Group: Evernote Employee
  • 12536 篇 文章總計

發表於 16 June 2009 - 06:39 PM

If you are using the Evernote API from a local client application, the UserStore.authenticate() function returns an AuthenticationResult with access to all of the relevant User data:
http://www.evernote.com/about/developer ... thenticate

For a web service, you can take the authorization/access token that you get via OAuth and pass it to UserStore.getUser() to receive a partial User object:
http://www.evernote.com/about/developer ... re_getUser

This User object will have the following fields set, if they are set in our service database (e.g. fullname is optional, so some users won't have it):
* active
* privilege
* shardId
* username
* fullname
* timezone

- Dave Engberg (Evernote)





目前瀏覽這個主題的用戶:1 位

0 位會員, 1 位訪客, 0 位匿名會員

Clip to Evernote