From 3385362f6e966f86852951f4446034fa4073a2db Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Mon, 3 Jun 2019 18:24:44 -0400 Subject: updated usage guide to reflect ?page=N --- assets/tmpl/index.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'assets/tmpl/index.html') diff --git a/assets/tmpl/index.html b/assets/tmpl/index.html index 9827646..15856f7 100644 --- a/assets/tmpl/index.html +++ b/assets/tmpl/index.html @@ -34,13 +34,15 @@ /api/plain/mentions /api/plain/tweets /api/plain/tags +

All queries accept ?page=N as a parameter, returning sets of 20 results. + This may be omitted for the first page of results.

Query by user:

$ curl '{{.URL}}/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

Query by tweet content:

-
$ curl '{{.URL}}/api/plain/tweets?q=getwtxt'
+        
$ curl '{{.URL}}/api/plain/tweets?q=getwtxt&page=2'
 foo_barrington    https://example3.com/twtxt.txt    2019-04-30T06:00:09.000Z    I just built getwtxt, time to set it up!

Query by mention:

$ curl '{{.URL}}/api/plain/mentions?url=https://foobarrington.co.uk/twtxt.txt'
@@ -48,8 +50,8 @@ foo    https://example.com/twtxt.txt    2019-02-26T11:06:44.000Z    @<foo_bar
       

Query by tag:

$ curl '{{.URL}}/api/plain/tags/programming'
 foo    https://example.com/twtxt.txt    2019-03-01T09:31:02.000Z    I love #programming!
-

Get latest 20 tweets:

-
$ curl '{{.URL}}/api/plain/tweets'
+      

Get 20 tweets:

+
$ curl '{{.URL}}/api/plain/tweets?page=2'
 foobar    https://example2.com/twtxt.txt    2019-05-13T12:46:20.000Z    It's been a busy day at work!
 ...

Get all users:

-- cgit 1.4.1-2-gfad0