1
0
Fork 0

- removed references to file related to parsing of the link headers;

- used 'tooter:collect-all-pages' instead of 'slurp-all-pages'.
This commit is contained in:
cage 2023-10-14 11:25:23 +02:00
parent 88b6857a2e
commit ea9675c832
2 changed files with 11 additions and 17 deletions

View File

@ -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*)))

View File

@ -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")