Skip to content

RESTful API F6

annypanny edited this page Nov 29, 2016 · 12 revisions

/author/friend_request/accept/[author_id]

  • It used to accept the friend request with sender's author_id.
  • The server return message.

Method:

POST

Example:

GET /author/friend_request/accept/d2325f9c-09de-492a-83a9-409047905e40

HTTP 405 Method Not Allowed
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
	"detail": "Method \"GET\" not allowed."
}

if there is no friend request exist, after post, it would return:

POST /author/friend_request/accept/d2325f9c-09de-492a-83a9-409047905e40

HTTP 400 Bad Request
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

if they is a friend request, after post (accept friend request), it would return:

POST /author/friend_request/accept/d2325f9c-09de-492a-83a9-409047905e40

HTTP 202 Accepted
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

Clone this wiki locally