diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-09-18 11:30:42 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-09-18 11:33:23 +0200 |
commit | a4b2d0d7fb2fbfed68e80fabaa45aed398aefb4e (patch) | |
tree | be1d3c379a4917eaed149e2e9619f091b2f3704d /lisp | |
parent | 4a6200be2e98b68e0869400ae21f89f2c1fa618a (diff) |
add cmd: mastodon-tl--remote-tag-timeline
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 0e98015..167e647 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -484,7 +484,7 @@ MAX-ID is a flag to add the max_id pagination parameter." params (when (eq arg 4) t)))) -(defun mastodon-tl--get-remote-local-timeline () +(defun mastodon-tl--get-remote-local-timeline (&optional endpoint) "Prompt for an instance domain and try to display its local timeline. You can enter any working instance domain. Domains that you want to regularly load can be stored in @@ -493,7 +493,8 @@ Note that some instances do not make their local timelines public, in which case this will not work. To interact with any item, you must view it from your own instance, which you can do with -`mastodon-tl--view-item-on-own-instance'." +`mastodon-tl--view-item-on-own-instance'. +Optionally, provide API ENDPOINT." (interactive) (let* ((domain (completing-read "Domain for remote local tl: " mastodon-tl--remote-local-domains)) @@ -509,9 +510,17 @@ instance, which you can do with (y-or-n-p "Domain appears unknown to your instance. Proceed?")) (mastodon-tl--init buf - "timelines/public" 'mastodon-tl--timeline nil + (or endpoint "timelines/public") + 'mastodon-tl--timeline nil params nil domain)))) +(defun mastodon-tl--remote-tag-timeline (&optional tag) + "Call `mastodon-tl--get-remote-local-timeline' but for a TAG timeline." + (interactive) + (let* ((tag (or tag (read-string "Tag: "))) + (endpoint (format "timelines/tag/%s" tag))) + (mastodon-tl--get-remote-local-timeline endpoint))) + (defun mastodon-tl--view-item-on-own-instance () "Load current toot on your own instance. Use this to re-load remote-local items in order to interact with them." |