This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathreaction.html
136 lines (136 loc) · 5.51 KB
/
reaction.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!doctype html>
<html>
<head>
<title>Reaction (unwalled.garden/reaction) | Unwalled.Garden</title>
<meta charset="utf-8">
<link rel="stylesheet" href="/assets/styles.css">
<link rel="stylesheet" href="/assets/syntax.css">
</head>
<body>
<h1><a href="/">Unwalled.Garden</a></h1>
<a class="nav-open"><img src="/assets/hamburger.svg"></a>
<div class="notice">Status: DRAFT. Part of the upcoming <a href="https://beakerbrowser.com">Beaker Browser</a> 0.9 release.</div>
<div class="page">
<nav>
<a class="nav-close"><img src="/assets/hamburger.svg"></a>
<ul>
<li>Docs
<ul>
<li><a href="/docs/how-does-it-work">How it works</a><ul>
<li><a href="/docs/common-fields">Common fields</a></li>
<li><a href="/docs/browser-integration">Browser integration</a></li>
</ul></li>
<li><a href="/docs/dat-primer">Dat protocol</a><ul>
<li><a href="/docs/mounts">Mounts</a></li>
</ul></li>
<li><a href="/docs/why-not-rdf">Why not RDF?</a></li>
</ul>
</li>
</ul>
<ul>
<li>APIs
<ul>
<li><a href="/api/bookmarks">Bookmarks</a></li>
<li><a href="/api/comments">Comments</a></li>
<li><a href="/api/follows">Follows</a></li>
<li><a href="/api/library">Library</a></li>
<li><a href="/api/profiles">Profiles</a></li>
<li><a href="/api/statuses">Statuses</a></li>
<li><a href="/api/reactions">Reactions</a></li>
<li><a href="/api/votes">Votes</a></li>
</ul>
</li>
</ul>
<ul>
<li>Schemas
<ul>
<li><a href="/bookmark">Bookmark</a></li>
<li><a href="/comment">Comment</a></li>
<li><a href="/follows">Follows</a></li>
<li><a href="/links">Links</a></li>
<li><a href="/person">Person</a></li>
<li><a href="/status">Status</a></li>
<li><a href="/reaction">Reaction</a></li>
<li><a href="/vote">Vote</a></li>
<li>dir<ul>
<li><a href="/dir/data">Data</a></li>
<li><a href="/dir/refs">Refs</a></li>
</ul></li>
</ul>
</li>
</ul>
<ul>
<li>Links
<ul>
<li><a href="https://github.com/beakerbrowser/unwalled.garden">Github Repo</a></li>
<li><a href="https://beakerbrowser.com">Beaker Browser</a></li>
<li><a href="https://dat.foundation">Dat protocol</a></li>
</ul>
</li>
</ul>
</nav>
<main><h2>Reaction <code>unwalled.garden/reaction</code></h2>
<hr>
<ul>
<li>File type</li>
<li><strong>Description</strong>: A string annotation on some resource.</li>
<li><strong>Path</strong>: <code>/.data/unwalled.garden/reactions/*.json</code></li>
</ul>
<hr>
<h4>Notes</h4>
<p>Each “phrase” is constrained to 20 lowercase english letters.</p>
<h4>Example</h4>
<pre><code class="language-json">{
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"unwalled.garden/reaction"</span>,
<span class="hljs-attr">"topic"</span>: <span class="hljs-string">"dat://beakerbrowser.com/"</span>,
<span class="hljs-attr">"phrases"</span>: [<span class="hljs-string">"like"</span>, <span class="hljs-string">"woah"</span>]
}
</code></pre>
<h4>Schema</h4>
<pre><code class="language-json">{
<span class="hljs-attr">"$schema"</span>: <span class="hljs-string">"http://json-schema.org/draft-07/schema#"</span>,
<span class="hljs-attr">"$id"</span>: <span class="hljs-string">"dat://unwalled.garden/reaction.json"</span>,
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"object"</span>,
<span class="hljs-attr">"title"</span>: <span class="hljs-string">"Reaction"</span>,
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"An string annotation on some resource."</span>,
<span class="hljs-attr">"required"</span>: [
<span class="hljs-string">"type"</span>,
<span class="hljs-string">"topic"</span>,
<span class="hljs-string">"phrases"</span>
],
<span class="hljs-attr">"properties"</span>: {
<span class="hljs-attr">"type"</span>: {
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span>,
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"The object's type"</span>,
<span class="hljs-attr">"const"</span>: <span class="hljs-string">"unwalled.garden/reaction"</span>
},
<span class="hljs-attr">"topic"</span>: {
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span>,
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"What this reaction is about"</span>,
<span class="hljs-attr">"format"</span>: <span class="hljs-string">"uri"</span>
},
<span class="hljs-attr">"phrases"</span>: {
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"array"</span>,
<span class="hljs-attr">"description"</span>: <span class="hljs-string">"The reaction phrases."</span>,
<span class="hljs-attr">"items"</span>: {
<span class="hljs-attr">"type"</span>: <span class="hljs-string">"string"</span>,
<span class="hljs-attr">"pattern"</span>: <span class="hljs-string">"^[a-z ]+$"</span>,
<span class="hljs-attr">"maxLength"</span>: <span class="hljs-number">20</span>
}
}
}
}
</code></pre>
</main>
</div>
</body>
<script type="module" src="/assets/admin.js"></script>
<script>
document.querySelector('.nav-open').addEventListener('click', e => {
document.querySelector('nav').classList.add('show')
})
document.querySelector('.nav-close').addEventListener('click', e => {
document.querySelector('nav').classList.remove('show')
})
</script>
</html>