-
Notifications
You must be signed in to change notification settings - Fork 2
RESTful API F9
annypanny edited this page Nov 29, 2016
·
1 revision
/friends/[author_id1]/[author_id2]
- It used to check whether these two given author id are friends or not.
- It returned a JSON.
- JSON file contains:
- "query"
- "authors"
- "friends"
Method:
GET
Example:
if there are not friend:
GET /friends/a9284a45-5605-4a47-a967-ad39c35c72ec/d2325f9c-09de-492a-83a9-409047905e40
HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept
{
"query": "friends",
"friends": false,
"authors": [
"a9284a45-5605-4a47-a967-ad39c35c72ec",
"d2325f9c-09de-492a-83a9-409047905e40"
]
}
if they are friends:
GET /friends/c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f/eb572e7b-7856-468b-bfdf-9b6388f9165c
HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept
{
"query": "friends",
"friends": true,
"authors": [
"c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f",
"eb572e7b-7856-468b-bfdf-9b6388f9165c"
]
}