diff --git a/_site/kinds/5400/index.html b/_site/kinds/5400/index.html index d210878..1add082 100644 --- a/_site/kinds/5400/index.html +++ b/_site/kinds/5400/index.html @@ -92,6 +92,15 @@

Params

How clients can use this

@@ -119,6 +128,23 @@

Response

"kind": 6400, "content": "129469" } + + +

Request

+
{
+    "content": "[{\"#kinds\":[7], \"#e\":[\"7b0d90f1973da1cea186c85fbd09b3e4e455ce4d438b60a3d1f9aabc1681418f\"}]",
+    "kind": 5400,
+    "tags": [
+      ["param", "group", "content"]
+    ]
+}
+
+ +

Response

+
{
+    "kind": 6400,
+    "content": "{\"🤙\":224,\"+\":31,\"🧡\":2,\"❤️\":7,\"🤣\":3,\"\":2,\"💜\":7,\":thinking face:\":1,\"🦶\":1,\"🍺\":1,\"🍆\":2,\"🤙🏼\":3,\"🔥\":2,\"🏇\":1,\"💚\":1}"
+}
 
diff --git a/kinds/5400.md b/kinds/5400.md index 3432de9..1ccacb4 100644 --- a/kinds/5400.md +++ b/kinds/5400.md @@ -15,6 +15,12 @@ The input MUST be a JSON-encoded list of filters as specified in NIP 01. # Params * `relay`: a relay url to include in the count (required, client MAY provide more than one relay) +* `group`: an event field or tag name to group results by, resulting in a potentially nested dictionary of results (optional, client MAY provide more than one group). Supported groups include: + * `content` - an event's `content` field + * `pubkey` - an event's `pubkey` field + * `reply` - an event's `reply` e-tag + * `root` - an event's `root` e-tag + * Any other value will be assumed to be a tag name. The first matching tag's value will be used. # How clients can use this @@ -42,3 +48,22 @@ Clients may want to avoid downloading large datasets from many relays simply in "content": "129469" } ``` + +#### Request +```json +{ + "content": "[{\"#kinds\":[7], \"#e\":[\"7b0d90f1973da1cea186c85fbd09b3e4e455ce4d438b60a3d1f9aabc1681418f\"}]", + "kind": 5400, + "tags": [ + ["param", "group", "content"] + ] +} +``` + +#### Response +```json +{ + "kind": 6400, + "content": "{\"🤙\":224,\"+\":31,\"🧡\":2,\"❤️\":7,\"🤣\":3,\"⚡\":2,\"💜\":7,\":thinking face:\":1,\"🦶\":1,\"🍺\":1,\"🍆\":2,\"🤙🏼\":3,\"🔥\":2,\"🏇\":1,\"💚\":1}" +} +```