Okay/Spec: Difference between revisions

Feel free to revert if bad.
Line 5: Line 5:
== in summary ==
== in summary ==


Okay is a group chat protocol. You connect to "Spaces" which contain “Rooms” which contain “People” who “Talk” by sending and receiving “Messages” to and from the “Server”.
Okay is a group chat protocol. You connect to "'''Spaces'''" which contain “'''Rooms'''” which contain “'''People'''” who “'''Talk'''” by sending and receiving “'''Messages'''” to and from the “'''Server'''”.


* A room is just a special URI which you can POST messages to and GET them back from at a later date.
* A room is just a special URI which you can POST messages to and GET them back from at a later date.
Line 43: Line 43:


=== linking to stuff ===
=== linking to stuff ===
Links in Okay follow the same rules as in standard HTML.
Links in Okay follow the same rules as in standard HTML.


When a client encounters a URI with a fragment, it must search for an element with a matching <code>id</code> in the linked document. If the specified element is present, the client must not scan the document for the desired markup, and instead consider the linked element to be the desired markup. If multiple instances of the same <code>id</code> exist in the document, the client must ignore all but the first instance. todo: make this make sense
When a client encounters a URI with a fragment, it <span class="must">must</span> search for an element with a matching <code>id</code> in the linked document. If the specified element is present, the client <span class="mustnt">must not</span> scan the document for the desired markup, and instead consider the linked element to be the desired markup. If multiple instances of the same <code>id</code> exist in the document, the client <span class="must">must</span> ignore all but the first instance. todo: make this make sense


== spaces ==
== spaces ==
Line 95: Line 96:


==== linking to other spaces ====
==== linking to other spaces ====
A document can direct clients to another document containing a space using an <code><a /></code> or <code><link /></code> element with the <code>rel="ok-space"</code> attribute. The client <span class="must">must</span> scan the linked document for valid <code>ok-space</code> markup, but it <span class="mustnt">must not</span> follow any further links or anchors with the <code>rel="ok-space"</code> attribute.
A document can direct clients to another document containing a space using an <code><a /></code> or <code><link /></code> element with the <code>rel="ok-space"</code> attribute. The client <span class="must">must</span> scan the linked document for valid <code>ok-space</code> markup, but it <span class="mustnt">must not</span> follow any further links or anchors with the <code>rel="ok-space"</code> attribute.


Line 106: Line 108:


==== metadata ====
==== metadata ====
Spaces can provide metadata about themselves to help users identify them.<syntaxhighlight lang="html"><nav class="ok-space">
 
Spaces <span class="may">may</span>/<span class="should">should</span> provide metadata about themselves to help users identify them.<syntaxhighlight lang="html"><nav class="ok-space">
     <h1 class="title"></h1>
     <h1 class="title"></h1>
     <p class="subtitle"></p>
     <p class="subtitle"></p>
Line 119: Line 122:


=== keys ===
=== keys ===
When registering with a space, a client <span class="should">should</span> transparently generate a key pair (TODO: what type(s)?) and store it for use in subsequent requests.
When registering with a space, a client <span class="should">should</span> transparently generate a key pair (TODO: what type(s)?) and store it for use in subsequent requests.


=== registration the page ===
=== registration the page ===
The registration page allows clients to register their public key and [[Okay#profiles|profile]] with the space.  
The registration page allows clients to register their public key and [[Okay#profiles|profile]] with the space.  


== the directory ==
== the directory ==
The '''Room Directory''' is a list of every room contained within the space. This list <span class="may">may</span> be [[Okay#pagination|paginated]].
The '''Room Directory''' is a list of every room contained within the space. This list <span class="may">may</span> be [[Okay#pagination|paginated]].


Line 139: Line 145:


=== sections ===
=== sections ===
A <code><section /></code> element denotes a '''section''', which allows severs to provide more structure to their room directory. Sections <span class="must">must</span> have a heading of any level as a direct descendant and one or more room links. Anything within the section that isn't a header or room link <span class="must">must</span> be ignored by the client.
A <code><section /></code> element denotes a '''section''', which allows severs to provide more structure to their room directory. Sections <span class="must">must</span> have a heading of any level as a direct descendant and one or more room links. Anything within the section that isn't a header or room link <span class="must">must</span> be ignored by the client.


Line 144: Line 151:


== messages ==
== messages ==
== profiles ==
== profiles ==
== subscriptions ==
== subscriptions ==


Line 150: Line 159:


== pagination ==
== pagination ==
Many lists can be '''paginated''' when it would be impractical to send its entire contents. This is common in message lists and room directories if you're getting a bit silly with it.
Many lists can be '''paginated''' when it would be impractical to send its entire contents. This is common in message lists and room directories if you're getting a bit silly with it.


== critical reception ==
== critical reception ==
It’s okay.
It’s okay.


[[Category:Pages that need things added to them]] [[Category:Pages with some amount of information in them]]
[[Category:Pages that need things added to them]] [[Category:Pages with some amount of information in them]]