diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-18 11:43:46 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-18 11:43:46 +0200 |
commit | 1cd94d7ee146b14c8fc97420ff57aa2205bc2e58 (patch) | |
tree | 3c6ff77dbb1df65effc40821493f72becf256668 /lisp/mastodon-tl.el | |
parent | 4dce2b78efbe9045379171b1c6a82bc25c5ef83d (diff) |
mastodon-http--api-search -> mastodon-http--api-v2
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 7a22c47..b83a20f 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2687,9 +2687,11 @@ PARAMS is used to send any parameters needed to correctly update the current view." (let* ((args `(("max_id" . ,(mastodon-tl--as-string id)))) (args (if params (push (car args) params) args)) - (url (if (string-suffix-p "search" endpoint) - (mastodon-http--api-search) - (mastodon-http--api endpoint)))) + (url + (mastodon-http--api + endpoint + (when (string-suffix-p "search" endpoint) + "v2")))) (apply #'mastodon-http--get-json-async url args callback cbargs))) (defun mastodon-tl--more-json-async-offset (endpoint &optional params @@ -2710,9 +2712,10 @@ Then run CALLBACK with arguments CBARGS." (+ limit ; limit + old offset = new offset (string-to-number (alist-get "offset" params nil nil #'equal))))) - (url (if (string-suffix-p "search" endpoint) - (mastodon-http--api-search) - (mastodon-http--api endpoint)))) + (url (mastodon-http--api + endpoint + (when (string-suffix-p "search" endpoint) + "v2")))) ;; increment: (setf (alist-get "offset" params nil nil #'equal) offset) (apply #'mastodon-http--get-json-async url params callback cbargs))) |