From ec7a384c3522426270ac99f35e1b09190d3cfb56 Mon Sep 17 00:00:00 2001 From: mycognosist Date: Mon, 12 Feb 2024 14:07:25 +0200 Subject: [PATCH] update the api docs --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 72aa4f7..43725ee 100644 --- a/README.md +++ b/README.md @@ -132,31 +132,31 @@ While running, a solar node can be queried using JSON-RPC over HTTP. | Method | Parameters | Response | Description | | --- | --- | --- | --- | -| `blocks` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `blockers` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `descriptions` | `["<@...=.ed25519>"]` | `[]` | Returns an array of descriptions | -| `self_descriptions` | `["<@...=.ed25519>"]` | `[]` | Returns an array of descriptions | -| `latest_description` | `["<@...=.ed25519>"]` | `` | Returns a single description | -| `latest_self_description` | `["<@...=.ed25519>"]` | `` | Returns a single description | -| `feed` | `["<@...=.ed25519>"]` | `[{ "key": "<%...=.sha256>", "value": , "timestamp": , "rts": null }]` | Returns an array of message KVTs (key, value, timestamp) from the local database | -| `follows` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `followers` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `is_following` | `["<@...=.ed25519>", "<@...=.ed25519>"]` | `` | Returns a boolean | -| `friends` | `["<@...=.ed25519>"]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `images` | `["<@...=.ed25519>"]` | `[<&...=.sha256>]` | Returns an array of image references | -| `self_images` | `["<@...=.ed25519>"]` | `[<&...=.sha256>]` | Returns an array of image references | -| `latest_image` | `["<@...=.ed25519>"]` | `<&...=.sha256>` | Returns a single image reference | -| `latest_self_image` | `["<@...=.ed25519>"]` | `<&...=.sha256>` | Returns a single image reference | -| `message` | `["<%...=.sha256>"]` | `{ "key": "<%...=.sha256>", "value": , "timestamp": , "rts": null }` | Returns a single message KVT (key, value, timestamp) from the local database | -| `names` | `["<@...=.ed25519>"]` | `[]` | Returns an array of names | -| `self_names` | `["<@...=.ed25519>"]` | `[]` | Returns an array of names | -| `latest_name` | `["<@...=.ed25519>"]` | `` | Returns a single name | -| `latest_self_name` | `["<@...=.ed25519>"]` | `` | Returns a single name | +| `blocks` | `{ "pub_key": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `blockers` | `{ "pub_key": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `descriptions` | `{ "pub_key": "<@...=.ed25519>" }` | `[]` | Returns an array of descriptions | +| `self_descriptions` | `{ "pub_key": "<@...=.ed25519>" }` | `[]` | Returns an array of descriptions | +| `latest_description` | `{ "pub_key": "<@...=.ed25519>" }` | `` | Returns a single description | +| `latest_self_description` | `{ "pub_key": "<@...=.ed25519>" }` | `` | Returns a single description | +| `feed` | `{ "pub_key": "<@...=.ed25519>" }` | `[{ "key": "<%...=.sha256>", "value": , "timestamp": , "rts": null }]` | Returns an array of message KVTs (key, value, timestamp) from the local database | +| `follows` | `{ "pub_key": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `followers` | `{ "pub_key": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `is_following` | `{ "peer_a": "<@...=.ed25519>", "peer_b": "<@...=.ed25519>" }` | `` | Returns a boolean | +| `friends` | `{ "pub_key": "<@...=.ed25519>" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `images` | `{ "pub_key": "<@...=.ed25519>" }` | `[<&...=.sha256>]` | Returns an array of image references | +| `self_images` | `{ "pub_key": "<@...=.ed25519>" }` | `[<&...=.sha256>]` | Returns an array of image references | +| `latest_image` | `{ "pub_key": "<@...=.ed25519>" }` | `<&...=.sha256>` | Returns a single image reference | +| `latest_self_image` | `{ "pub_key": "<@...=.ed25519>" }` | `<&...=.sha256>` | Returns a single image reference | +| `message` | `{ "msg_ref": "<%...=.sha256>" }` | `{ "key": "<%...=.sha256>", "value": , "timestamp": , "rts": null }` | Returns a single message KVT (key, value, timestamp) from the local database | +| `names` | `{ "pub_key": "<@...=.ed25519>" }` | `[]` | Returns an array of names | +| `self_names` | `{ "pub_key": "<@...=.ed25519>" }` | `[]` | Returns an array of names | +| `latest_name` | `{ "pub_key": "<@...=.ed25519>" }` | `` | Returns a single name | +| `latest_self_name` | `{ "pub_key": "<@...=.ed25519>" }` | `` | Returns a single name | | `peers` | | `[{ "pub_key": "<@...=.ed25519>", "seq_num": }` | Returns an array of public key and latest sequence number for each peer in the local database | | `ping` | | `pong!` | Responds if the JSON-RPC server is running | | `publish` | `` | `{ "msg_ref": "<%...=.sha256>", "seq_num": }` | Publishes a message and returns the reference (message hash) and sequence number | -| `subscribers` | `[""]` | `[<@...=.ed25519>]` | Returns an array of public keys | -| `subscriptions` | `["<@...=.ed25519>"]` | `[]` | Returns an array of channel names | +| `subscribers` | `{ "channel": "" }` | `[<@...=.ed25519>]` | Returns an array of public keys | +| `subscriptions` | `{ "pub_key": "<@...=.ed25519>" }` | `[]` | Returns an array of channel names | | `whoami` | | `<@...=.ed25519>` | Returns the public key of the local node | ### Examples