-
Notifications
You must be signed in to change notification settings - Fork 2
RESTful API F8
annypanny edited this page Nov 30, 2016
·
6 revisions
/friends/[author_id]
- It used to get the list of the friend that the given author id has.
- It returned a JSON.
- JSON file contains:
- "authors"
- "query"
Method:
GET
Example:
GET /friends/a9284a45-5605-4a47-a967-ad39c35c72ec
HTTP 200 OK
Allow: GET, POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"authors": [
"c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f"
],
"query": "friends"
}
- ask a service if anyone in the list is a friend
- JSON contains:
- "authors"
Method:
POST
Example:
POST /friends/a9284a45-5605-4a47-a967-ad39c35c72ec
HTTP 200 OK
Allow: GET, POST, OPTIONS
Content-Type: application/json
Vary: Accept
{
"authors": [
"c974a1fd-fa8c-4d99-97d6-6006e0ee0a5f"
],
}