From 4a68c374ea9777d2368b1d235df8d07e68c0b91a Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Sat, 11 Jul 2020 16:32:11 +0900 Subject: qkbox: toot: Rename procedures. --- qkbox/toot.scm | 14 +++++++------- 1 file 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)))))) -- cgit v1.2.3