Threads of comments on the AT Protocol, the protocol of Bluesky, read from an AppView.
An AppView indexes the network. It gives the thread below a post in one call, app.bsky.feed.getPostThread, without an account. The labels that the protocol defines apply:
A thread starts at the at URI of a post, or at the URL of its page on Bluesky's web app. Each comment and each author has the :url of its page there, and post-url and profile-url give the page on another web app.
Threads of comments on the AT Protocol, the protocol of Bluesky, read from an AppView. An AppView indexes the network. It gives the thread below a post in one call, app.bsky.feed.getPostThread, without an account. The labels that the protocol defines apply: - a reply whose author asks apps to show it only to signed-in users is left out - a reply that a moderation service hid is left out - a reply with a warning is :sensitive? - a reply that the author of the root post hid is :hidden? A thread starts at the at URI of a post, or at the URL of its page on Bluesky's web app. Each comment and each author has the :url of its page there, and post-url and profile-url give the page on another web app.
(at-uri s)The parts of the at URI s as a map of :authority, :collection and
:rkey, or nil for another string.
An at URI has the form at://authority/collection/rkey. The authority is the DID or the handle of a repository, and the rkey is the record key.
The parts of the at URI `s` as a map of :authority, :collection and :rkey, or nil for another string. An at URI has the form at://authority/collection/rkey. The authority is the DID or the handle of a repository, and the rkey is the record key.
(hiccup record)(hiccup record opts)The content of record, the record of an AT Protocol post, as Hiccup by
opts: one paragraph, with a break for each line break of the text.
The result is a sequence of nodes to put inside a parent element.
A link of the post is a link. The :link-fn of opts is a function of a
part. It gives the URL that a mention or a hashtag links to, or nil for
no link, e.g. the profile-url of the :id of a mention.
The content of `record`, the record of an AT Protocol post, as Hiccup by `opts`: one paragraph, with a break for each line break of the text. The result is a sequence of nodes to put inside a parent element. A link of the post is a link. The :link-fn of `opts` is a function of a part. It gives the URL that a mention or a hashtag links to, or nil for no link, e.g. the profile-url of the :id of a mention.
(parts record)The parts of the content of record, the record of an AT Protocol post
with its "text" and its "facets", in their order. Each part is a map
with its :type and the :text that the post shows for it:
{:type :text :text "/cc "}
{:type :link :text "atproto.com/blog" :url "https://atproto.com/blog"}
{:type :mention :text "@npmx.dev" :id "did:plc:u5zp…"}
{:type :hashtag :text "#podcast" :tag "podcast"}
A facet counts UTF-8 bytes, so the text is cut as bytes.
The parts of the content of `record`, the record of an AT Protocol post
with its "text" and its "facets", in their order. Each part is a map
with its :type and the :text that the post shows for it:
{:type :text :text "/cc "}
{:type :link :text "atproto.com/blog" :url "https://atproto.com/blog"}
{:type :mention :text "@npmx.dev" :id "did:plc:u5zp…"}
{:type :hashtag :text "#podcast" :tag "podcast"}
A facet counts UTF-8 bytes, so the text is cut as bytes.(post-uri s)The at URI of the post that s names, or nil for another string.
The s is the at URI of a post, or the URL of its page on Bluesky's web
app, https://bsky.app/profile/actor/post/rkey, whose actor is the handle
or the DID of its author. An AppView reads an at URI with a handle, so
the at URI of such a page has the actor as it is.
The at URI of the post that `s` names, or nil for another string. The `s` is the at URI of a post, or the URL of its page on Bluesky's web app, https://bsky.app/profile/actor/post/rkey, whose actor is the handle or the DID of its author. An AppView reads an at URI with a handle, so the at URI of such a page has the actor as it is.
(post-url uri)(post-url uri opts)The URL of the page of the post at the at URI uri on Bluesky's web
app, or on the web app with the same paths at the :origin of opts.
It's nil for another URI.
The URL of the page of the post at the at URI `uri` on Bluesky's web app, or on the web app with the same paths at the :origin of `opts`. It's nil for another URI.
(profile-url actor)(profile-url actor {:keys [origin] :or {origin web-origin} :as opts})The URL of the page of the actor, a DID or a handle, on Bluesky's web
app, or on the web app with the same paths at the :origin of opts.
It's nil for another string.
The URL of the page of the `actor`, a DID or a handle, on Bluesky's web app, or on the web app with the same paths at the :origin of `opts`. It's nil for another string.
(readable? {:keys [uri] :as interact} opts)Whether the thread of interact can be read with opts. Its URI must
name a post, as post-uri reads it, and opts must name an :appview.
Whether the thread of `interact` can be read with `opts`. Its URI must name a post, as post-uri reads it, and `opts` must name an :appview.
(requests {:keys [uri read-at comments]
:dk.simongray.podcast.comments/keys [held]
:as thread}
{:keys [appview max-comments] :as opts}
ask-pred)The requests that the AT Protocol thread needs next with opts, of
those whose URLs ask-pred takes.
They go to the :appview of opts. They ask for no more posts than the
:max-comments of opts allows, counted from the start of the reading.
The root post comes first. Then come the posts nearest to it whose replies are below the levels that the AppView gives at once.
The requests that the AT Protocol `thread` needs next with `opts`, of those whose URLs `ask-pred` takes. They go to the :appview of `opts`. They ask for no more posts than the :max-comments of `opts` allows, counted from the start of the reading. The root post comes first. Then come the posts nearest to it whose replies are below the levels that the AppView gives at once.
(resumed {:keys [comments] :as thread})The AT Protocol thread as a new reading of it starts: unread again
where a failure that can pass with time stopped the last reading.
This is the root, and the replies below a post.
The AT Protocol `thread` as a new reading of it starts: unread again where a failure that can pass with time stopped the last reading. This is the root, and the replies below a post.
The origin of Bluesky's web app, whose links to posts name threads, and whose pages are the :url of each comment and author.
The origin of Bluesky's web app, whose links to posts name threads, and whose pages are the :url of each comment and author.
(with-exchanges {:keys [read-at] :as thread} [exchange :as exchanges] at)The AT Protocol thread with the exchanges of one of its requests
read into it at at. There's one exchange for the request.
A root that the AppView doesn't give is a problem of the root, and a post that's gone is a deleted comment.
The AT Protocol `thread` with the `exchanges` of one of its requests read into it at `at`. There's one exchange for the request. A root that the AppView doesn't give is a problem of the root, and a post that's gone is a deleted comment.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |