forked from
microcosm.blue/microcosm-rs
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 %}[deprecated] All link counts{% endblock %}
5
6{% block content %}
7
8 {% call try_it::links_all_count(query.target) %}
9
10 <h2>
11 All links to <code>{{ query.target }}</code>
12 {% if let Some(browseable_uri) = query.target|to_browseable %}
13 <small style="font-weight: normal; font-size: 1rem"><a href="{{ browseable_uri }}">browse record</a></small>
14 {% endif %}
15 </h2>
16
17 <ul>
18 <li>This endpoint is deprecated. use <code>/links/all</code> instead: <a href="/links/all?target={{ query.target|urlencode }}">/links/all?target={{ query.target }}</a></li>
19 </ul>
20
21 <h3>Links by collection and path:</h3>
22
23<pre style="display: block; margin: 1em 2em" class="code">
24{%- for (collection, collection_links) in links -%}
25 <strong>{{ collection }}</strong>
26 {%- for (path, count) in collection_links %}
27 {{ path }}: <a href="/links?target={{ query.target|urlencode }}&collection={{ collection|urlencode }}&path={{ path|urlencode }}">{{ count|human_number }} links</a></li>
28 {%- endfor %}
29
30{% else -%}
31 <em>No links indexed for this target</em>
32{% endfor -%}
33</pre>
34 <details>
35 <summary>Raw JSON response</summary>
36 <pre class="code">{{ self|tojson }}</pre>
37 </details>
38
39{% endblock %}