Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0

Configure Feed

Select the types of activity you want to include in your feed.

1{% macro get_backlinks(subject, source, dids, limit, reverse) %} 2 <form method="get" action="/xrpc/blue.microcosm.links.getBacklinks"> 3 <pre class="code"><strong>GET</strong> /xrpc/blue.microcosm.links.getBacklinks 4 ?subject= <input type="text" name="subject" value="{{ subject }}" placeholder="at-uri, did, uri..." /> 5 &source= <input type="text" name="source" value="{{ source }}" placeholder="app.bsky.feed.like:subject.uri" /> 6 {%- for did in dids %}{% if !did.is_empty() %} 7 &did= <input type="text" name="did" value="{{ did }}" placeholder="did:plc:..." />{% endif %}{% endfor %} 8 <span id="did-placeholder"></span> <button id="add-did">+ did filter</button> 9 &limit= <input type="number" name="limit" value="{{ limit }}" max="100" placeholder="100" /> 10 &reverse= <input type="checkbox" name="reverse" value="true" {% if reverse %}checked{% endif %}> 11 <button type="submit">get links</button></pre> 12 </form> 13 <script> 14 const addDidButton = document.getElementById('add-did'); 15 const didPlaceholder = document.getElementById('did-placeholder'); 16 addDidButton.addEventListener('click', e => { 17 e.preventDefault(); 18 const i = document.createElement('input'); 19 i.placeholder = 'did:plc:...'; 20 i.name = "did" 21 const p = addDidButton.parentNode; 22 p.insertBefore(document.createTextNode('&did= '), didPlaceholder); 23 p.insertBefore(i, didPlaceholder); 24 p.insertBefore(document.createTextNode('\n '), didPlaceholder); 25 }); 26 </script> 27{% endmacro %} 28 29{% macro get_many_to_many_counts(subject, source, pathToOther, dids, otherSubjects, limit) %} 30 <form method="get" action="/xrpc/blue.microcosm.links.getManyToManyCounts"> 31 <pre class="code"><strong>GET</strong> /xrpc/blue.microcosm.links.getManyToManyCounts 32 ?subject= <input type="text" name="subject" value="{{ subject }}" placeholder="at-uri, did, uri..." /> 33 &source= <input type="text" name="source" value="{{ source }}" placeholder="app.bsky.feed.like:subject.uri" /> 34 &pathToOther= <input type="text" name="pathToOther" value="{{ pathToOther }}" placeholder="otherThing.uri" /> 35 {%- for did in dids %}{% if !did.is_empty() %} 36 &did= <input type="text" name="did" value="{{ did }}" placeholder="did:plc:..." />{% endif %}{% endfor %} 37 <span id="m2m-subject-placeholder"></span> <button id="m2m-add-subject">+ other subject filter</button> 38 {%- for otherSubject in otherSubjects %}{% if !otherSubject.is_empty() %} 39 &otherSubject= <input type="text" name="did" value="{{ otherSubject }}" placeholder="at-uri, did, uri..." />{% endif %}{% endfor %} 40 <span id="m2m-did-placeholder"></span> <button id="m2m-add-did">+ did filter</button> 41 &limit= <input type="number" name="limit" value="{{ limit }}" max="100" placeholder="100" /> <button type="submit">get links</button></pre> 42 </form> 43 <script> 44 const m2mAddDidButton = document.getElementById('m2m-add-did'); 45 const m2mDidPlaceholder = document.getElementById('m2m-did-placeholder'); 46 m2mAddDidButton.addEventListener('click', e => { 47 e.preventDefault(); 48 const i = document.createElement('input'); 49 i.placeholder = 'did:plc:...'; 50 i.name = "did" 51 const p = m2mAddDidButton.parentNode; 52 p.insertBefore(document.createTextNode('&did= '), m2mDidPlaceholder); 53 p.insertBefore(i, m2mDidPlaceholder); 54 p.insertBefore(document.createTextNode('\n '), m2mDidPlaceholder); 55 }); 56 const m2mAddSubjectButton = document.getElementById('m2m-add-subject'); 57 const m2mSubjectPlaceholder = document.getElementById('m2m-subject-placeholder'); 58 m2mAddSubjectButton.addEventListener('click', e => { 59 e.preventDefault(); 60 const i = document.createElement('input'); 61 i.placeholder = 'at-uri, did, uri...'; 62 i.name = "otherSubject" 63 const p = m2mAddSubjectButton.parentNode; 64 p.insertBefore(document.createTextNode('&otherSubject= '), m2mSubjectPlaceholder); 65 p.insertBefore(i, m2mSubjectPlaceholder); 66 p.insertBefore(document.createTextNode('\n '), m2mSubjectPlaceholder); 67 }); 68 </script> 69{% endmacro %} 70 71{% macro links(target, collection, path, dids, limit) %} 72 <form method="get" action="/links"> 73 <pre class="code"><strong>GET</strong> /links 74 ?target= <input type="text" name="target" value="{{ target }}" placeholder="target" /> 75 &collection= <input type="text" name="collection" value="{{ collection }}" placeholder="collection" /> 76 &path= <input type="text" name="path" value="{{ path }}" placeholder="path" /> 77 {%- for did in dids %}{% if !did.is_empty() %} 78 &did= <input type="text" name="did" value="{{ did }}" placeholder="did:plc:..." />{% endif %}{% endfor %} 79 <span id="did-placeholder"></span> <button id="add-did">+ did filter</button> 80 &limit= <input type="number" name="limit" value="{{ limit }}" max="100" placeholder="100" /> <button type="submit">get links</button></pre> 81 </form> 82 <script> 83 const addDidButton = document.getElementById('add-did'); 84 const didPlaceholder = document.getElementById('did-placeholder'); 85 addDidButton.addEventListener('click', e => { 86 e.preventDefault(); 87 const i = document.createElement('input'); 88 i.placeholder = 'did:plc:...'; 89 i.name = "did" 90 const p = addDidButton.parentNode; 91 p.insertBefore(document.createTextNode('&did= '), didPlaceholder); 92 p.insertBefore(i, didPlaceholder); 93 p.insertBefore(document.createTextNode('\n '), didPlaceholder); 94 }); 95 </script> 96{% endmacro %} 97 98{% macro dids(target, collection, path) %} 99 <form method="get" action="/links/distinct-dids"> 100 <pre class="code"><strong>GET</strong> /links/distinct-dids 101 ?target= <input type="text" name="target" value="{{ target }}" placeholder="target" /> 102 &collection= <input type="text" name="collection" value="{{ collection }}" placeholder="collection" /> 103 &path= <input type="text" name="path" value="{{ path }}" placeholder="path" /> <button type="submit">get links</button></pre> 104 </form> 105{% endmacro %} 106 107{% macro get_backlinks_count(subject, source) %} 108 <form method="get" action="/xrpc/blue.microcosm.links.getBacklinksCount"> 109 <pre class="code"><strong>GET</strong> /xrpc/blue.microcosm.links.getBacklinksCount 110 ?subject= <input type="text" name="subject" value="{{ subject }}" placeholder="subject" /> 111 &source= <input type="text" name="source" value="{{ source }}" placeholder="source" /> <button type="submit">get links count</button></pre> 112 </form> 113{% endmacro %} 114 115{% macro links_count(target, collection, path) %} 116 <form method="get" action="/links/count"> 117<pre class="code"><strong>GET</strong> /links/count 118 ?target= <input type="text" name="target" value="{{ target }}" placeholder="target" /> 119 &collection= <input type="text" name="collection" value="{{ collection }}" placeholder="collection" /> 120 &path= <input type="text" name="path" value="{{ path }}" placeholder="path" /> <button type="submit">get links count</button></pre> 121 </form> 122{% endmacro %} 123 124 125{% macro dids_count(target, collection, path) %} 126 <form method="get" action="/links/count/distinct-dids"> 127<pre class="code"><strong>GET</strong> /links/count/distinct-dids 128 ?target= <input type="text" name="target" value="{{ target }}" placeholder="target" /> 129 &collection= <input type="text" name="collection" value="{{ collection }}" placeholder="collection" /> 130 &path= <input type="text" name="path" value="{{ path }}" placeholder="path" /> <button type="submit">get links count</button></pre> 131 </form> 132{% endmacro %} 133 134 135{% macro links_all_count(target) %} 136 <form method="get" action="/links/all/count"> 137 <pre class="code"><strong>GET</strong> /links/all/count?target=<input type="text" name="target" value="{{ target }}" placeholder="target" /> <button type="submit">get all target link counts</button></pre> 138 </form> 139{% endmacro %} 140 141 142{% macro explore_links(target) %} 143 <form method="get" action="/links/all"> 144 <pre class="code"><strong>GET</strong> /links/all?target=<input type="text" name="target" value="{{ target }}" placeholder="target" /> <button type="submit">get all target link counts</button></pre> 145 </form> 146{% endmacro %}