Skip to content

API Doc: Friend Request Access

Carson McLean edited this page Nov 30, 2016 · 4 revisions

POST /api/friendrequest

With HTTP POST it is used to become friends with a user. Unfriending is done locally without API.

Sending a JSON object as the body of the POST with the query type, details of the requesting author's ID, host, display name, and the requested friend's id, host, displayName, and url.

Here is an example of a request for a frient:
POST /api/friends/de305d54-75b4-431b-adb2-eb6b9e546013/ae345d54-75b4-431b-adb2-fb6b9e547891 HTTP/1.1

{
	"query":"friendrequest",
	"author": {
	    # UUID
		"id":"de305d54-75b4-431b-adb2-eb6b9e546013",
		"host":"http://127.0.0.1:5454/",
		"displayName":"Greg Johnson"
	},
	"friend": {
	    # UUID
		"id":"de305d54-75b4-431b-adb2-eb6b9e637281",
		"host":"http://127.0.0.1:5454/",
		"displayName":"Lara Croft",
		"url":"http://127.0.0.1:5454/author/9de17f29c12e8f97bcbbd34cc908f1baba40658e"
	}
}

200 Ok ...


Clone this wiki locally