From bc5af89daa3978f5d21158a0817eef23184d4b84 Mon Sep 17 00:00:00 2001 From: bom Date: Thu, 24 Feb 2022 15:56:35 +0100 Subject: [PATCH] base function to get replies to status --- src/main/dda/masto_embed/api.cljs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/dda/masto_embed/api.cljs b/src/main/dda/masto_embed/api.cljs index a5842bf..97ce77f 100644 --- a/src/main/dda/masto_embed/api.cljs +++ b/src/main/dda/masto_embed/api.cljs @@ -41,6 +41,16 @@ (str "accounts/" account-id "/statuses") #js {})) +; https://mastodon.example/api/v1/statuses/:id/context +; for parent and child statuses +; "descendants" +(defn get-replies + [host-url + status-id] + (.get (mastodon-client host-url) + (str "statuses/" status-id "/context") + #js {})) + (defn-spec get-directory any? [host-url ::host-url] (.get (mastodon-client host-url)