From e2071dc3d2bd5540c25f531988a8dd7e714f63cb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 26 May 2024 16:12:08 +0200 Subject: view instance desc: use api v2 --- lisp/mastodon-http.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-http.el') 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)." -- cgit v1.2.3