Group: GNU Social P2P/Design/Agent2RemoteCore
(Created page with '== Core to Core == Remember that values are opaque to Cores. === HTTP REST === A simple binding over HTTP REST. All {} enclosed structures are JSON encoded. $route = { uri: …') |
m (→Core to Core) |
||
Line 1: | Line 1: | ||
+ | < [[User:Miron2/Social_Design]] | ||
+ | |||
== Core to Core == | == Core to Core == | ||
Revision as of 14:12, 30 May 2010
Contents
Core to Core
Remember that values are opaque to Cores.
HTTP REST
A simple binding over HTTP REST. All {} enclosed structures are JSON encoded.
$route = { uri: $destURI }
send
Notify a remote of a new value at a certain path.
$path_keys = [ $path_key* ]
path_keys is an array of encrypted path keys that would enable the friend's UI to decrypt the value. It starts with a path_key encrypted with the friend's public key.
POST '/send', { route: $route, body: recipient, { path: $path, path_keys: $path_keys, value: $value, } }
result is:
{ success: true }
or
{ success: false, message: "why" }
get
Request the value at a certain path.
GET '/get', { route: $route, body: { friend_id: $friend_id, path: $path, } }
result is:
{ success: true, result: $value, $crypt_chain }
or
{ success: false, message: "why" }