diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-30 09:34:29 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-30 09:34:29 +0200 |
commit | 2a0ed3e4e8f9a9f6067385e241e3eaf65d6e48e4 (patch) | |
tree | 81dff3a283054eee61eb27a675e6bbbe23940e92 /lisp | |
parent | 3834d8f29bd1d293d41febe965daaf39887b088a (diff) |
view-trending: add limit params, and go to point min
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-search.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el index 3794c4e..abb7995 100644 --- a/lisp/mastodon-search.el +++ b/lisp/mastodon-search.el @@ -104,7 +104,11 @@ TYPE is a string, either tags, statuses, or links. PRINT-FUN is the function used to print the data from the response." (let* ((url (mastodon-http--api (format "trends/%s" type))) - (response (mastodon-http--get-json url)) + ;; max for statuses = 40, for others = 20 + (params (if (equal type "statuses") + `(("limit" . "40")) + `(("limit" . "20")) )) + (response (mastodon-http--get-json url params)) (data (cond ((equal type "tags") (mapcar #'mastodon-search--get-hashtag-info response)) @@ -127,7 +131,9 @@ PRINT-FUN is the function used to print the data from the response." (upcase (format " TRENDING %s\n" type)) " " mastodon-tl--horiz-bar "\n\n") 'success)) - (funcall print-fun data))))) + (funcall print-fun data) + (unless (equal type "statuses") + (goto-char (point-min)))))) ;; functions for mastodon search |