diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 21:26:16 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-13 21:26:16 +0200 |
commit | accd94eea7e99e2a2acbf51e0ea877db6ef420fe (patch) | |
tree | 4ad701f98c61c4009bdb08f41c6f852e3c326544 /lisp/mastodon-search.el | |
parent | 57aec26ea873dd8c93d3d438a26af9d79cc867cd (diff) |
add offset/limit params to search queries/buf spec
Diffstat (limited to 'lisp/mastodon-search.el')
-rw-r--r-- | lisp/mastodon-search.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 287d593..4f41a86 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -103,9 +103,11 @@ PRINT-FUN is the function used to print the data from the response." (let* ((url (mastodon-http--api (format "trends/%s" type))) ;; max for statuses = 40, for others = 20 - (params (if (equal type "statuses") - '(("limit" . "40")) - '(("limit" . "20")))) + (limit (if (equal type "statuses") + '("limit" . "40") + '("limit" . "20"))) + (offset '(("offset" . "0"))) + (params (push limit offset)) (response (mastodon-http--get-json url params)) (data (cond ((equal type "tags") (mapcar #'mastodon-search--get-hashtag-info response)) @@ -117,6 +119,8 @@ PRINT-FUN is the function used to print the data from the response." (with-mastodon-buffer buffer #'mastodon-mode nil (mastodon-tl--set-buffer-spec (buffer-name buffer) (format "trends/%s" type) + print-fun nil + params) (insert (mastodon-tl--set-face (concat "\n " mastodon-tl--horiz-bar "\n" (upcase (format " TRENDING %s\n" type)) |