stretchr / sdk-js

HTML5 and JavaScript SDK for Stretchr
http://docs.stretchr.com/sdks/javascript.md
3 stars 0 forks source link

automagically load user data if a user ref is present #15

Open mazondo opened 10 years ago

mazondo commented 10 years ago

Need to give the user access to a userData or currentUser object that gives them all of the user's data. Should use the stretchr resource class so that it can be interacted with.

matryer commented 10 years ago

Perhaps we could have this kind of interface:

stretchr.getUser({
  success: function(user, response){
    // do something with user
  }
})
mazondo commented 10 years ago

Would this just be the normal thing? and if it's already loaded it fires success immediately?