friend
GET /friend
Browse friends of a specific user
Example URI
h3. Parameters
Parameter | Type | Require ? | Description |
---|---|---|---|
search[search] | string | no | Keyword for searching friends |
user_id | string | no | Iser id |
limit | number | no | Limit return results |
view | string | no | Support some view mode: mutual, online |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": [ { "user_id": "13", "friend_id": "26", "friend_user_id": "13", "is_top_friend": "0", "user_name": "profile-13", "full_name": "Isabella Jolie" }, { "user_id": "7", "friend_id": "12", "friend_user_id": "7", "is_top_friend": "0", "user_name": "profile-7", "full_name": "Vivian" }, { "user_id": "14", "friend_id": "28", "friend_user_id": "14", "is_top_friend": "0", "user_name": "profile-14", "full_name": "William" } ], "messages": [] } |
DELETE /friend
Remove a friend
Example URI
h3. Parameters
Parameter | Type | Require ? | Description |
---|---|---|---|
friend_user_id | number | yes | Friend id |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": [], "messages": [ "Friend successfully deleted." ] } |
POST /friend/request
Post new friend request
Example URI
h3. Parameters
Parameter | Type | Require ? | Description |
---|---|---|---|
user_id | number | yes | User id that want to be friend with |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": [], "messages": [ "Friend request successfully sent." ] } |
DELETE /friend/request
Cancel a friend request
Example URI
h3. Parameters
Parameter | Type | Require ? | Description |
---|---|---|---|
user_id | number | yes | Friend id |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": [], "messages": [ "Friend request successfully deleted." ] } |
PUT /friend/request
Accept or deny a friend request
Example URI
h3. Parameters
Parameter | Type | Require ? | Description |
---|---|---|---|
user_id | number | yes | Friend id |
action | string | yes | Available values: accept, deny |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "status": "success", "data": [], "messages": [ "Friend request successfully accepted." ] } |