summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2020-07-09 04:58:58 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2020-07-09 05:00:51 +0900
commit2a2aa4aa384e031a9467bfb58c090f60cd88c4a1 (patch)
tree579bda2d617da5d79f8bde672d6b6e56980ccf1f
parentb30041c077d05e4d2916e081ed2dae5d206b0ab8 (diff)
qkbox: toot: Add id->status procedure.
-rw-r--r--qkbox/toot.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/qkbox/toot.scm b/qkbox/toot.scm
index f021b1b..de891d9 100644
--- a/qkbox/toot.scm
+++ b/qkbox/toot.scm
@@ -162,6 +162,20 @@
(format #f "~s"
(status-content status)))))))))
+(define* (id->status id #:key (authorization? #t))
+ (define-values (res body)
+ (/api/v1/statuses/:id id #:authorization? authorization?))
+ (case (response-code res)
+ ((200) (make-status body))
+ (else
+ (error "timeline: failed" res body))))
+
+(define* (/api/v1/statuses/:id id #:key (authorization? #t))
+ (request
+ 'GET
+ (format #f "/api/v1/statuses/~a" id)
+ #:authorization? authorization?))
+
(define* (timeline #:key max-id since-id min-id limit local?)
(define-values (res body)
(/api/v1/timelines/home #:max-id max-id