diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-05-27 19:51:51 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-05-27 19:51:51 +0200 |
commit | 476268af7d78d3136d6d6bf11856d0c0d6fd1c7a (patch) | |
tree | b4c4eace33d293f5f511280ee0a11005a80c4980 /lisp/mastodon-http.el | |
parent | 49def07b3d9b6f0718ef9402a3808ca01557245e (diff) | |
parent | 4c3bdb30b8d0238e8b5900a42938d865e7dc407f (diff) |
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r-- | lisp/mastodon-http.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 49c94a4..7ef6f77 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -47,10 +47,11 @@ (defconst mastodon-http--timeout 15 "HTTP request timeout, in seconds. Has no effect on Emacs < 26.1.") -(defun mastodon-http--api (endpoint) - "Return Mastodon API URL for ENDPOINT." +(defun mastodon-http--api (endpoint &optional version) + "Return Mastodon API URL for ENDPOINT. +Optionally specify VERSION in format vX." (concat mastodon-instance-url "/api/" - mastodon-http--api-version "/" endpoint)) + (or version mastodon-http--api-version) "/" endpoint)) (defun mastodon-http--api-search () "Return Mastodon API url for the /search endpoint (v2)." |