-
Notifications
You must be signed in to change notification settings - Fork 2
kfang edited this page Sep 12, 2014
·
2 revisions
#!!!this was for v0.1!!!
#Auth Service ####Request URL for OAuth2 code
//you need to pass in at least one 'scope', look at GoogleAuthScope trait
AuthService.getAccountsOauth2URL("some-state-session-id", OpenID, Email, Profile, PlusLogin)
####Request Access Token from code
AuthService.requestAccessToken("CODE")
#Users Service ####Request User Information
//for self
UsersService.getUserInfo("ACCESS_TOKEN")
//for another user
UsersService.getUserInfo("USER_ID", "ACCESS_TOKEN")
####Request User Friends
//for self - need to specify a 'collection' => see PeopleCollectionList
UsersService.getUserFriends("ACCESS_TOKEN", Visible)
//for another user
val fPeopleResponse = UsersService.getUserFriends("USER_ID", "ACCESS_TOKEN", Visible)
//paging through friends
UsersService.getUserFirends("USER_ID", "ACCESS_TOKEN", Visible, Some("PAGE_TOKEN"))
//you can also
fPeopleResponse.flatMap(peopleResponse => peopleResponse.next)
//you can check for a next
fPeopleResponse.map(peopleResponse => peopleResponse.hasNext)
//calling next when there's no next returns an empty item list