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 %}Link Count{% endblock %}
5{% block description %}Count of {{ query.source }} records linking to {{ query.subject }}{% endblock %}
6
7{% block content %}
8
9 {% call try_it::get_backlinks_count(
10 query.subject,
11 query.source,
12 ) %}
13
14 <h2>
15 Total links to <code>{{ query.subject }}</code>
16 {% if let Some(browseable_uri) = query.subject|to_browseable %}
17 <small style="font-weight: normal; font-size: 1rem"><a href="{{ browseable_uri }}">browse record</a></small>
18 {% endif %}
19 </h2>
20
21 <p><strong><code>{{ total|human_number }}</code></strong> total links from <code>{{ query.source }}</code> to <code>{{ query.subject }}</code></p>
22
23 <ul>
24 <li>
25 See direct backlinks at <code>/xrpc/blue.microcosm.links.getBacklinks</code>:
26 <a href="/xrpc/blue.microcosm.links.getBacklinks?subject={{ query.subject|urlencode }}&source={{ query.source|urlencode }}">
27 /xrpc/blue.microcosm.links.getBacklinks?subject={{ query.subject }}&source={{ query.source }}
28 </a>
29 </li>
30 <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>
31 </ul>
32
33 <details>
34 <summary>Raw JSON response</summary>
35 <pre class="code">{{ self|tojson }}</pre>
36 </details>
37
38{% endblock %}