summary refs log tree commit diff stats
path: root/assets/tmpl/index.html
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-04 01:42:17 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-04 01:42:17 -0400
commit3df037d0a9d763256508092f3b0c7362b22431e2 (patch)
tree972992c5775bfb0df7beced52a56de008debc697 /assets/tmpl/index.html
parenta4aff1c4af365b66dde1b8751a7a495de280f946 (diff)
downloadgetwtxt-3df037d0a9d763256508092f3b0c7362b22431e2.tar.gz
refactored landing page template and tweaked styling
Diffstat (limited to 'assets/tmpl/index.html')
-rw-r--r--assets/tmpl/index.html57
1 files changed, 37 insertions, 20 deletions
diff --git a/assets/tmpl/index.html b/assets/tmpl/index.html
index 509107b..dea649c 100644
--- a/assets/tmpl/index.html
+++ b/assets/tmpl/index.html
@@ -34,33 +34,50 @@
 /api/plain/mentions
 /api/plain/tweets
 /api/plain/tags</code></pre>
-      <p>All queries accept <code>?page=N</code> as a parameter, returning groups of 20 results. 
-      This may be omitted for the first page of results.</p>
-      <p>Query by user:</p>
-        <pre><code>$ curl '{{.URL}}/api/plain/users?q=foo'
+        <p>Add new user by submitting a <code>POST</code> request to the <code>/api/plain/users</code> endpoint. 
+        If both <code>?url=X</code> and <code>?nickname=X</code> are not passed, or the user already exists in 
+        this registry, you will receive <code>400 Bad Request</code> as a response. If you are unsure what went
+        wrong, the error message should provide enough information for you to correct the request.</p>
+        <pre><code>$ curl -X POST '{{.URL}}/api/plain/users?url=https://example3.com/twtxt.txt&amp;nickname=foo_barrington'
+200 OK</code></pre>
+      <p>Query responses are in descending chronological order. This means the newest user or tweet will be in the
+      first row of the response, with older users or tweets in subsequent rows. Additionally, All queries accept <code>?page=N</code> 
+      as a parameter, returning groups of 20 results. This may be omitted for the first page of results.</p>
+      <p>Get all users:</p>
+        <pre><code>$ curl '{{.URL}}/api/plain/users'
 foo               https://example.com/twtxt.txt     2019-05-09T08:42:23.000Z
-foobar            https://example2.com/twtxt.txt    2019-03-14T19:23:00.000Z
+foobar            https://example2.com/twtxt.txt    2019-04-14T19:23:00.000Z
+foo_barrington    https://example3.com/twtxt.txt    2019-03-01T15:59:39.000Z</code></pre>
+      <p>Query for user by URL:</p>
+        <pre><code>$ curl '{{.URL}}/api/plain/users?url=https://example3.com/twtxt.txt'
 foo_barrington    https://example3.com/twtxt.txt    2019-05-01T15:59:39.000Z</code></pre>
-      <p>Query by tweet content:</p>
-        <pre><code>$ curl '{{.URL}}/api/plain/tweets?q=getwtxt&amp;page=2'
+      <p>Query for user by keyword:</p>
+        <pre><code>$ curl '{{.URL}}/api/plain/users?q=bar'
+foobar            https://example2.com/twtxt.txt    2019-05-14T19:23:00.000Z
+foo_barrington    https://example3.com/twtxt.txt    2019-04-01T15:59:39.000Z</code></pre>
+      <p>Get all tweets:</p>
+        <pre><code>$ curl '{{.URL}}/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>Query tweets by keyword:</p>
+        <pre><code>$ curl '{{.URL}}/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>
+      <p>Get all tweets with mentions:</p>
+        <pre><code>$ curl '{{.URL}}/api/plain/mentions'
+foo               https://example.com/twtxt.txt     2019-02-28T11:06:44.000Z    @&lt;foo_barrington https://example3.com/twtxt.txt&gt; Hey!! Are you still working on that project?
+bar               https://mxmmplm.com/twtxt.txt     2019-02-27T11:06:44.000Z    @&lt;foobar https://example2.com/twtxt.txt&gt; How's your day going, bud?
+foo_barrington    https://example3.com/twtxt.txt    2019-02-26T11:06:44.000Z    @&lt;foo https://example.com/twtxt.txt&gt; Did you eat my lunch?</code></pre>
+      <p>Query tweets by mention URL:</p>
         <pre><code>$ curl '{{.URL}}/api/plain/mentions?url=https://foobarrington.co.uk/twtxt.txt'
 foo    https://example.com/twtxt.txt    2019-02-26T11:06:44.000Z    @&lt;foo_barrington https://example3.com/twtxt.txt&gt; Hey!! Are you still working on that project?</code></pre>
-      <p>Query by tag:</p>
+      <p>Get all tweets with tags:</p>
+        <pre><code>$ curl '{{.URL}}/api/plain/tags'
+foo    https://example.com/twtxt.txt    2019-03-01T09:33:12.000Z    No, seriously, I need help.
+foo    https://example.com/twtxt.txt    2019-03-01T09:32:05.000Z    Seriously, I love #programming!
+foo    https://example.com/twtxt.txt    2019-03-01T09:31:02.000Z    I love #programming!</code></pre>
+      <p>Query tweets by tag:</p>
         <pre><code>$ curl '{{.URL}}/api/plain/tags/programming'
 foo    https://example.com/twtxt.txt    2019-03-01T09:31:02.000Z    I love #programming!</code></pre>
-      <p>Get 20 tweets:</p>
-        <pre><code>$ 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!
-...</code></pre>
-      <p>Get all users:</p>
-        <pre><code>$ curl '{{.URL}}/api/plain/users'
-foo_barrington    https://example3.com/twtxt.txt    2018-11-21T18:31:00.000Z
-...</code></pre>
-      <p>Add new user by submitting a <code>POST</code> request. If both variables are not used, or the user already exists in this registry, the server will respond with <code>400 Bad Request</code></p>
-        <pre><code>$ curl -X POST '{{.URL}}/api/plain/users?url=https://example3.com/twtxt.txt&amp;nickname=foo_barrington'
-200 OK</code></pre>
     </div>
     <div id="foot">
       powered by <a href="https://github.com/getwtxt/getwtxt">getwtxt</a>
n363' href='#n363'>363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624