Skip to content

RESTful API F2

annypanny edited this page Nov 29, 2016 · 9 revisions

/author/friends/friend_requests

  • It used to get the list of the friend request current author sent, and others to the current author's friend request.

  • It returned a JSON.

  • JSON file contains:

    • "count"
    • "next"
    • "previous"
    • "results"

    and each "results" contains:

    • "sender"
    • "receiver"

    and each "sender" and "receiver" contains:

    • "displayName"
    • "id"
    • "host"
    • "url"
    • "github"
    • "is_local"

Method:

GET

Example:

GET /author/friends/friend_requests


HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
	"count": 1,
	"next": null,
	"previous": null,
	"results": [
	    {
	        "sender": {
	            "displayName": "iamuser",
	            "id": "d2325f9c-09de-492a-83a9-409047905e40",
	            "host": "http://socialnets404.herokuapp.com/",
	            "url": "http://socialnets404.herokuapp.com/author/d2325f9c-09de-492a-83a9-409047905e40",
	            "github": "[email protected]",
	            "is_local": true
	        },
	        "receiver": {
	            "displayName": "Administrator",
	            "id": "c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f",
	            "host": "http://socialnets404.herokuapp.com/",
	            "url": "http://socialnets404.herokuapp.com/author/c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f",
	            "github": "jiafengwu0301",
	            "is_local": true
	        }
	    }
	]
}

Clone this wiki locally