Skip to content

Friending and Unfriending

ellio edited this page Feb 24, 2012 · 2 revisions

(Work in progress)

Relevant methods in Application

  1. Application.requestFriends(Long id)
  • Attempts to request a friendship with user who's id is id, from the user who is connected. Will make users confirmed friends if the the other user has requested the connected one.
  1. Application.removeFriends(Long id)
  • Attempts to remove friend (represented by id). Will do nothing if user's aren't friends.

Relevant methods in User

  1. User.checkFriendship(Long id)
  • Checks the current friendship status, returning a string representing the Relationship status. (Strongly consider changing the way this function works/specifically what it returns):
    • id is the current user: ""
    • id and the current user are confirmed friends: "Friends"
    • current user has requested to be friends with id: "Friendship Requested"
    • else: "Request Friendship"
  1. User.confirmedFriends()
  • Returns a List containing all confirmed friends.
  1. User.requestedFriends()
  • Returns a List containing all users who have requested to be friends with the current user.