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

Configure Feed

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

scalar docs

phil ba4fe675 35b578a8

+43 -23
+40 -22
ufos/src/index_html.rs
··· 1 - pub const INDEX_HTML: &str = r#"<!DOCTYPE html> 1 + pub const INDEX_HTML: &str = r#"<!doctype html> 2 2 <html lang="en"> 3 3 <head> 4 4 <meta charset="utf-8" /> 5 5 <title>UFOs API Documentation</title> 6 6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 7 7 <meta name="description" content="API Documentation for UFOs: Samples and stats for all atproto lexicons." /> 8 - <link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui.css" /> 8 + <style> 9 + .custom-header { 10 + height: 42px; 11 + background-color: var(--scalar-background-1); 12 + box-shadow: inset 0 -1px 0 var(--scalar-border-color); 13 + color: var(--scalar-color-1); 14 + font-size: var(--scalar-font-size-3); 15 + font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif; 16 + padding: 0 18px; 17 + justify-content: space-between; 18 + } 19 + .custom-header, 20 + .custom-header nav { 21 + display: flex; 22 + align-items: center; 23 + gap: 18px; 24 + } 25 + .custom-header a:hover { 26 + color: var(--scalar-color-2); 27 + } 28 + </style> 9 29 </head> 10 30 <body> 11 - <div id="swagger-ui"></div> 12 - <script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js" crossorigin></script> 13 - <script src="https://unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js" crossorigin></script> 14 - <script> 15 - window.onload = () => { 16 - window.ui = SwaggerUIBundle({ 17 - url: '/openapi', 18 - dom_id: '#swagger-ui', 19 - presets: [ 20 - SwaggerUIBundle.presets.apis, 21 - SwaggerUIStandalonePreset 22 - ], 23 - layout: "StandaloneLayout", 24 - deepLinking: true, 25 - displayRequestDuration: true, 26 - tryItOutEnabled: true, 27 - requestSnippetsEnabled: true 28 - }); 29 - }; 30 - </script> 31 + <header class="custom-header scalar-app"> 32 + <b>a <a href="https://microcosm.blue">microcosm</a> project</b> 33 + <nav> 34 + <a href="https://bsky.app/profile/microcosm.blue">@microcosm.blue</a> 35 + <a href="https://github.com/at-microcosm">github</a> 36 + </nav> 37 + </header> 38 + 39 + <script id="api-reference" type="application/json" data-url="/openapi""></script> 40 + 41 + <script> 42 + var configuration = { 43 + theme: 'purple', 44 + } 45 + document.getElementById('api-reference').dataset.configuration = JSON.stringify(configuration) 46 + </script> 47 + 48 + <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script> 31 49 </body> 32 50 </html> 33 51 "#;
+3 -1
ufos/src/server.rs
··· 122 122 } 123 123 /// Get recent records by collection 124 124 /// 125 - /// Multiple collections are supported. they will be delivered in one big array with no 125 + /// Multiple collections are supported. They will be delivered in one big array with no 126 126 /// specified order. 127 127 #[endpoint { 128 128 method = GET, ··· 214 214 } 215 215 216 216 /// Get top collections 217 + /// 218 + /// The format of this API response will be changing soon. 217 219 #[endpoint { 218 220 method = GET, 219 221 path = "/collections"