Contacts API
General concept
We have a simplier way of retrieving userâs friends list, so visit Friends API page if you only need that functionality.
Y8 uses a follower system (similar to Twitter, for example). A user can follow another user and remain notified about his activities, until another user blocks him.
When the user starts following someone else, link between them is created. Link has four possible states:
- Pending (state from which all contacts start)
- Accepted (means that receiver reviewed link)
- Blocked (user forbids following him)
- Mutual (users accepts following and follows back)
Listing actions
Y8 presents a list of consistent interfaces to view and manage user affiliations.
Methods, listed above only affect users that are already registered in your application. Effectively, this means that if user Jacob has friends Mason and Ethan, Mason has logged into your application and Ethan has not, you will only get Mason when retrieving Jacobâs friend list.
Getting friends list
Request
Will result in list of users that current user follows and that followed him back.
Response
Getting followees list
Request
Will result in list of users that current user follows.
Response
See friends response
Getting followers list
Response
Will result in list of users that follow current user.
There is another way to get incoming connections:
This differs from previous one, because it excludes accepted requests. So, effectively, it is a subset of followers. This request could be used for getting new follow requests, not reviewed by user.
Response
See friends response
Getting blocked users list
Request
Will result in list of users that are blocked by the current user.
Response
See friends response
Managing contacts
Here is comprehensive list of how to manipulate user contacts with the API:
Creating/deleting links
Follow request
After this action target will appear in followees list.
Response
Unfollow request
Response
See follow response. Only method (unfollow) differs.
Reviewing incoming request
Accept
Marks request âas readâ, so it wonât appear in the pending contacts list.
Response
See follow response. Only method (accept) differs.
Add to friends
Will add target to the current accounts friends. Same will happen if both target and current user will create follow requests.
Response
See follow response. Only method (mutual_accept) differs.
Blocking users
Block request
Will forbid target user from following current user and will add him to the blocked list.
Response
See follow response. Only method (block) differs.
Unblock
Block can be lifted by using following request:
After it target will no longer be banned, link will get accepted state and target will appear in followers list.
Response
See follow response. Only method (unblock) differs.
Check
Check if another pid is a friend