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.collection }} records linking to {{ query.target }} at JSON path {{ query.path }}{% endblock %} 6 7{% block content %} 8 9 {% call try_it::links_count(query.target, query.collection, query.path) %} 10 11 <h2> 12 Total links to <code>{{ query.target }}</code> 13 {% if let Some(browseable_uri) = query.target|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><code>{{ total|human_number }}</code></strong> total links from <code>{{ query.collection }}</code> at <code>{{ query.path }}</code></p> 19 20 <ul> 21 <li>See these links at <code>/links</code>: <a href="/links?target={{ query.target|urlencode }}&collection={{ query.collection|urlencode }}&path={{ query.path|urlencode() }}">/links?target={{ query.target|urlencode }}&collection={{ query.collection|urlencode }}&path={{ query.path|urlencode }}</a></li> 22 <li>See a count of distinct DIDs at <code>/links/count/distinct-dids</code>: <a href="/links/count/distinct-dids?target={{ query.target|urlencode }}&collection={{ query.collection|urlencode }}&path={{ query.path|urlencode() }}">/links?target={{ query.target|urlencode }}&collection={{ query.collection|urlencode }}&path={{ query.path|urlencode }}</a></li> 23 </ul> 24 25 <details> 26 <summary>Raw JSON response</summary> 27 <pre class="code">{{ self|tojson }}</pre> 28 </details> 29 30{% endblock %}