-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathspec.html
73 lines (71 loc) · 3.96 KB
/
spec.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
<!DOCTYPE html>
<html>
<head>
<title>revisit.link</title>
<meta content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="main.css">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-4319539-55', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<header>
<div>
<h1>
<a href="index.html">revisit everything<span>!</span></a>
</h1>
<h2>An API playground.</h2>
</div>
</header>
<section>
<article>
<h3>Description</h3>
<p>A <strong>service</strong> is a web application that interacts with the revisit.link hub. It accepts image data that is encoded in <a href="http://en.wikipedia.org/wiki/Base64">base64</a>, performs manipulations to the data to produce crazy glitches in the image, and returns the data back, also in base64 format. Developers are free to use whatever code stacks they want, so far have created services in a variety of technologies including node.js, go, processing, and ruby.</p>
<p>Once a service is online and validated, it can be publically listed in the central hub. Once it's published, people can visit <a href="//hub.revisit.link/">hub.revisit.link</a> to create glitch art with that service. See below for instructions on listing your service.</p>
<p>In order to be added to the hub, a service must follow all of the rules below. Use <a href="https://github.com/revisitors/revisit-test-util">this project to test requests</a> to your service, and <a href="https://github.com/revisitors/node-revisit-validator">this project to validate</a> your service.</p>
</article>
<article>
<h3>Specifications</h3>
<ol>
<li>The following are the only REST calls the service needs to provide to users:
<ul>
<li><span>HEAD</span> / where it can return a 200 response when we ping the server to see if it is up.</li>
<li><span>POST</span> /service where JSON is posted to you in the following format:
<pre>
<code>{
"content": {
"data": "data:image/jpeg;base64,<a base64 blob of the data>"
},
"meta": { }
}</code></pre>
and returns the following format:
<pre>
<code>{
"content": {
"data": "data:image/jpeg;base64,<a base64 blob of the data>"
},
"meta": { }
}</code></pre>
</li>
</ul>
</li>
<li>All content from a service can only be accessed by that service. Content stored on the central hub will be deleted after 1 hour.</li>
<li>Any content passed through http://hub.revisit.link cannot exceed 1 MB per data URI. But data coming from distributed services may increase to a greater size, so ensure your service endpoint can handle a size averaging between 1-3 MB.</li>
<li>All code for the service must be open source.</li>
<li>If any of the services violate the rules listed above, they will be removed from the central hub (or not merged).</li>
<li>Once you are ready to include your service to the central hub, add your domain and send a <a href="https://github.com/revisitors/revisit.link.hub/blob/master/config/services.json">pull request to this file</a>.</li>
</ol>
</article>
</section>
<footer>
<p>This content is all hosted on <a href="https://github.com/revisitors/revisit.link">Github</a></p>
</footer>
</body>
</html>