aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el7
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)."