Group: GNU Social P2P/Design/Agent2RemoteCore
m (moved Group:GNU Social P2P/Design/Core2Core to Group:GNU Social P2P/Design/Agent2RemoteCore: Redesign) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | < [[ | + | < [[Group:GNU Social P2P/Design]] |
== Core to Core == | == Core to Core == | ||
Line 10: | Line 10: | ||
$route = { uri: $destURI } | $route = { uri: $destURI } | ||
− | ==== | + | ==== enqueue ==== |
Notify a remote of a new value at a certain path. | Notify a remote of a new value at a certain path. | ||
Line 16: | Line 16: | ||
$path_keys = [ $path_key* ] | $path_keys = [ $path_key* ] | ||
− | path_keys is an array of encrypted path keys that would enable the friend's | + | path_keys is an array of encrypted path keys that would enable the friend's Agent to decrypt the value. It starts with a path_key encrypted with the friend's public key. |
POST '/send', { | POST '/send', { |
Latest revision as of 23:07, 20 November 2010
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 }
enqueue
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 Agent 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, value: $value, $path_keys }
or
{ success: false, message: "why" }
scan
Request the paths at a subtree:
GET '/scan', { route: $route, body: { friend_id: $friend_id, path: $path, end_path: $end_path, max: $max, order: $order, } }
result is:
{ success: true, paths: [$path*], $path_keys }
or
{ success: false, message: "why" }