-
Notifications
You must be signed in to change notification settings - Fork 0
Get friends
Rafael Chacon edited this page Feb 22, 2012
·
1 revision
Return the list of friends for specified user (users followed by specified user), sorted by username. Pagination can be disabled
###URL:
GET http://public-api.piictu.com/v2/users/<user id>/friends
###HTTP method(s): GET
###Requires authentication (Authentication and Authorization): true
###Parameters:
-
pagination(optional:integer) A value of0indicates that pagination is disabled, and the method will return all the friends. otherwise pagination will be enabled -
page(optional:integer): Specifies the page of results to retrieve, default = 1. -
rpp(optional:integer): results per page, default =10, max = 50.
###Usage example:
Example using cURL:
curl -i http://public-api.piictu.com/v2/users/4d99eb672696e71604000001/friends \
-H "Authorization: OAuth 2540af0de12cb2367691516b8477b0b7bd66dbd8ab6840b147340c6898c4eebd"###Response:
On success
- HTTP response code is
200(ok) - HTTP response body is a JSON string like this:
{
"current_page": 1,
"results_per_page": 10,
"total_entries": 9,
"total_pages": 1,
"friends": [
{
"user": {
"id": "4e37221a955d710001000523",
"username": "aimeexox",
"avatar_url": "http://piictu.s3.amazonaws.com/avatars/4e37221a955d710001000523/90x90_1318226458",
"fullname": "",
"bio": null,
"photos_count": 18
}
},
{
"user": {
"id": "4da9ca7ffe07656dcf000014",
"username": "meap",
"avatar_url": "http://piictu.s3.amazonaws.com/avatars/4da9ca7ffe07656dcf000014/90x90_1315503185",
"fullname": "Petr Reichl",
"bio": "Piictu Inc.",
"photos_count": 115
}
},
...
]
}