summary refs log tree commit diff stats
path: root/assets/tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'assets/tmpl')
-rw-r--r--assets/tmpl/index.html53
1 files changed, 52 insertions, 1 deletions
diff --git a/assets/tmpl/index.html b/assets/tmpl/index.html
index fdd91ca..e702d08 100644
--- a/assets/tmpl/index.html
+++ b/assets/tmpl/index.html
@@ -3,11 +3,62 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <meta name="application-name" content="getwtxt">
   <link rel="stylesheet" type="text/css" href="/css">
-  <title>{{.Title}} - twtxt Registry</title>
+  <title>{{.Name}} - twtxt Registry</title>
 </head>
 <body>
   <div id="container">
+    <div id="head">
+      <h2>{{.Name}}</h2>
+    </div>
+    <div id="subhead">
+      twtxt registry
+    </div>
+    <div id="body">
+      <p>{{.Desc}}</p>
+      <p>API base URL:</p>
+      <pre><code>/api</code></pre>
+          <p>Formats available:</p>
+        <pre><code>/api/plain</code></pre>
+      <p>Endpoints:</p>
+<pre><code>/api/plain/users
+/api/plain/mentions
+/api/plain/tweets
+/api/plain/tags</code></pre>
+  <p>Query by user:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/users?q=foo'
+foo               https://example.com/twtxt.txt     2019-05-09T08:42:23.000Z
+foobar            https://example2.com/twtxt.txt    2019-03-14T19:23:00.000Z
+foo_barrington    https://example3.com/twtxt.txt    2019-05-01T15:59:39.000Z</code></pre>
+          <p>Query by tweet content:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/tweets?q=getwtxt'
+foo_barrington    https://example3.com/twtxt.txt    2019-04-30T06:00:09.000Z    I just built getwtxt, time to set it up!</code></pre>
+          <p>Query by mention:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/mentions?url=https://foobarrington.co.uk/twtxt.txt'
+foo    https://example.com/twtxt.txt    2019-02-26T11:06:44.000Z    @<foo_barrington https://example3.com/twtxt.txt> Hey!! Are you still working on that project?</code></pre>
+          <p>Query by tag:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/tags/programming'
+foo    https://example.com/twtxt.txt    2019-03-01T09:31:02.000Z    I love #programming!</code></pre>
+          <p>Get latest 20 tweets:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/tweets'
+foobar    https://example2.com/twtxt.txt    2019-05-13T12:46:20.000Z    It's been a busy day at work!
+...</code></pre>
+          <p>Get all users:</p>
+        <pre><code>$ curl 'https://getwtxt.example.com/api/plain/users'
+foo_barrington    https://example3.com/twtxt.txt    2018-11-21T18:31:00.000Z
+...</code></pre>
+          <p>Add new user:</p>
+        <pre><code>$ curl -X POST 'https://getwtxt.example.com/api/plain/users?url=https://example3.com/twtxt.txt&nickname=foo_barrington'
+OK</code></pre>
+    </div>
+    <div id="info">
+    Instance Owner: {{.Owner}}<br />
+    Mail: {{.Mail}}<br />
+    </div>
+    <div id="foot">
+      powered by <a href="https://github.com/gbmor/getwtxt">getwtxt</a>
+    </div>
   </div>
 </body>
 </html>