Add friendship api view and update friendship functional.