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