Skip to content

Instantly share code, notes, and snippets.

@ThorstenHans
Last active August 29, 2015 13:56
Show Gist options
  • Save ThorstenHans/9134848 to your computer and use it in GitHub Desktop.
Save ThorstenHans/9134848 to your computer and use it in GitHub Desktop.
ShareCoffee.UserProfiles
window.MyAngularApp.service 'userProfilesService', ['$http', ($http) ->
loadMyProfile: (onSuccess, onError) ->
$http ShareCoffee.REST.build.read.for.angularJS
url: ShareCoffee.Url.GetMyProperties
.success onSuccess
.error onError
loadProfilePropertiesForUser: (accountName, onSuccess, onError) ->
properties = new ShareCoffee.UserProfileProperties(ShareCoffee.Url.GetUserProfileProperty, accountName, 'WorkEmail')
$http ShareCoffee.REST.build.read.for.angularJS
properties
.success onSuccess
.error onError
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment