Y8 provides API requests to retrieve a list of a user’s friends to display in your application.
Getting friends list
Request
or
Accepts following attributes:
Attribute
Requirement
Default value
Description
id
Required
Unique identifier for user in your application
offset
Optional
0
Offset to start from
limit
Optional
20
Number of users per page. Can't be more then 100.
Response
Response will have a list of friends nicknames, paths to avatars and ids in “data” array and a special object for pagination, that will have links to next and previous (if available) pages.
The id parameter in each Object of the data Array is the corresponding PID of the user
Note that link to next page will be always present, even if there are no more friends to show.
Example Request
GET /api/v1/json/5257eb9aa80315f627000006/friends?limit=2&offset=4
Authorization: Bearer c95f1d3ce3d4f077e4968e1a7976c9fa0fd5f90db703682c4ed29a308f58e99c
Example Response
We have a request for getting only person’s followers. It works exacly the same as friends, but “friends” should be replaced by “followers” in all according routes.