aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-14 13:55:27 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-14 13:55:27 +0200
commit5f1fd9564dbf8e4d68d37be9ea4bd62991483749 (patch)
tree6b9cd90a6b943ef01756a5a8e7d3b4e8ddd415ba /lisp/mastodon-http.el
parentba364e75dcab736770fc8b6a60f7f7b4ff611f34 (diff)
add http--api-v2
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 51b144e..2635eef 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -53,6 +53,10 @@ Optionally specify VERSION in format vX."
(concat mastodon-instance-url "/api/"
(or version mastodon-http--api-version) "/" endpoint))
+(defun mastodon-http--api-v2 (endpoint)
+ "Return Mastodon API v2 URL for ENDPOINT."
+ (mastodon-http--api endpoint "v2"))
+
(defun mastodon-http--api-search ()
"Return Mastodon API url for the /search endpoint (v2)."
(format "%s/api/v2/search" mastodon-instance-url))