Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
1{% extends "base.html.j2" %}
2{% import "try-it-macros.html.j2" as try_it %}
3
4{% block title %}DIDs{% endblock %}
5{% block description %}Distinct DIDs with records in {{ query.source }} linking to {{ query.subject }} {% endblock %}
6
7{% block content %}
8
9 {% call try_it::get_backlink_dids(query.subject, query.source) %}
10
11 <h2>
12 Distinct DIDs with links to <code>{{ query.subject }}</code> from <code>{{ query.source }}</code>
13 {% if let Some(browseable_uri) = query.subject|to_browseable %}
14 <small style="font-weight: normal; font-size: 1rem"><a href="{{ browseable_uri }}">browse record</a></small>
15 {% endif %}
16 </h2>
17
18 <p><strong>{{ total|human_number }} distinct DIDs</strong> with links to <code>{{ query.subject }}</code> from <code>{{ query.source }}</code></p>
19
20 <ul>
21 <li>See direct backlinks at <code>/xrpc/blue.microcosm.links.getBacklinks</code>: <a href="/xrpc/blue.microcosm.links.getBacklinks?subject={{ query.subject|urlencode }}&source={{ query.source|urlencode }}">/xrpc/blue.microcosm.links.getBacklinks?subject={{ query.subject }}&source={{ query.source }}</a></li>
22 <li>See all links to this target at <code>/links/all</code>: <a href="/links/all?target={{ query.subject|urlencode }}">/links/all?target={{ query.subject }}</a></li>
23 </ul>
24
25 <h3>DIDs, most recent first:</h3>
26
27 {% for did in linking_dids %}
28 <pre style="display: block; margin: 1em 2em" class="code"><strong>DID</strong>: {{ did.0 }}
29 -> see <a href="/links/all?target={{ did.0|urlencode }}">links to this DID</a>
30 -> browse <a href="https://pdsls.dev/at://{{ did.0 }}">this DID record</a></pre>
31 {% endfor %}
32
33 {% if let Some(c) = cursor %}
34 <form method="get" action="/xrpc/blue.microcosm.links.getBacklinkDids">
35 <input type="hidden" name="subject" value="{{ query.subject }}" />
36 <input type="hidden" name="source" value="{{ query.source }}" />
37 <input type="hidden" name="cursor" value={{ c|json|safe }} />
38 <button type="submit">next page…</button>
39 </form>
40 {% else %}
41 <button disabled><em>end of results</em></button>
42 {% endif %}
43
44 <details>
45 <summary>Raw JSON response</summary>
46 <pre class="code">{{ self|tojson }}</pre>
47 </details>
48
49{% endblock %}