From ea9675c832bdf5daf61d1e7f7f32005f83387d18 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 14 Oct 2023 11:25:23 +0200 Subject: [PATCH] - removed references to file related to parsing of the link headers; - used 'tooter:collect-all-pages' instead of 'slurp-all-pages'. --- src/api-client.lisp | 26 +++++++++++--------------- tinmop.asd | 2 -- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/api-client.lisp b/src/api-client.lisp index 32abb08..4ca1d8d 100644 --- a/src/api-client.lisp +++ b/src/api-client.lisp @@ -267,14 +267,6 @@ Returns nil if the user did not provided a server in the configuration file" (when (client-valid-p) ,@remaining-forms)))) -(defmacro slurp-all-pages (starting-form) - (with-gensyms (results page) - `(let ((,results '())) - (tooter:do-pages (*client* ,page :direction :next) - ,starting-form - (setf ,results (append ,results ,page))) - ,results))) - (defun-api-call get-announcements () "Get all the non dismissed announcements" (let ((all-announcements (tooter:get-announcements *client*))) @@ -321,11 +313,12 @@ Returns nil if the user did not provided a server in the configuration file" (defun-api-call get-followed-tags (&key max-id since-id min-id (limit 20)) "Unfollow a tag" - (slurp-all-pages (tooter:followed-tags *client* - :max-id max-id - :since-id since-id - :min-id min-id - :limit limit))) + (tooter:collect-all-pages *client* + (tooter:followed-tags *client* + :max-id max-id + :since-id since-id + :min-id min-id + :limit limit))) (define-constant +public-timeline+ "public" :test #'string=) @@ -580,7 +573,7 @@ database." (defun-api-call follow-requests () "Gets the request to follow the user of this client" - (let ((requests (slurp-all-pages (tooter:follow-requests *client*)))) + (let ((requests (tooter:collect-all-pages *client* (tooter:follow-requests *client*)))) (values requests (mapcar #'tooter:account-name requests)))) @@ -596,7 +589,10 @@ database." (defun-api-call get-following (user-id &optional (min-id nil)) "Get a list of accounts that user is following" - (sort-id< (slurp-all-pages (tooter:get-following *client* user-id :max-id min-id)))) + (sort-id< (tooter:collect-all-pages *client* + (tooter:get-following *client* + user-id + :max-id min-id)))) (defun local-user-acct () (tooter:id (tooter:account *client*))) diff --git a/tinmop.asd b/tinmop.asd index c5d7445..56329e3 100644 --- a/tinmop.asd +++ b/tinmop.asd @@ -85,7 +85,6 @@ (:file "stack") (:file "uri-parser") (:file "iri-parser") - (:file "link-header-parser") (:file "tour-mode-parser") (:file "x509-ffi") (:file "x509") @@ -189,7 +188,6 @@ (:file "box-tests") (:file "uri-tests") (:file "iri-tests") - (:file "link-header-tests") (:file "numeric-tests") (:file "text-utils-tests") (:file "mtree-tests")