diff options
Diffstat (limited to 'qkbox/toot.scm')
-rw-r--r-- | qkbox/toot.scm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qkbox/toot.scm b/qkbox/toot.scm index e774d8b..e433df8 100644 --- a/qkbox/toot.scm +++ b/qkbox/toot.scm @@ -248,13 +248,13 @@ (hash-set! avatar-static-hash url pict) pict)))) -(define*-public (status id #:key (authorization? #t)) +(define*-public (fetch-status id #:key (authorization? #t)) (receive (res body) (/api/v1/statuses/:id id #:authorization? authorization?) (case (response-code res) ((200) (make-status body)) (else - (error "status: failed" res body))))) + (error "fetch-status: failed" res body))))) (define* (/api/v1/statuses/:id id #:key (authorization? #t)) (request @@ -380,19 +380,19 @@ (values res (json-string->scm (utf8->string body))) (values res body)))) -(define*-public (account id) +(define*-public (fetch-account id) (receive (res body) (/api/v1/accounts/:id id) (case (response-code res) ((200) (make-account body)) ((401) - (error "account: Unauthorized" id)) + (error "fetch-account: Unauthorized" id)) ((404) - (error "account: Not Found" id)) + (error "fetch-account: Not Found" id)) ((410) - (error "account: Account is suspended" id)) + (error "fetch-account: Account is suspended" id)) (else - (error "account: failed" + (error "fetch-account: failed" (response-code res) (utf8->string body)))))) |