branch: elpa/fedi
commit 132229e6634b64d01eb7e332c5f086fdc973a876
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    add version string arg to fedi-http--api-version
---
 fedi-http.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fedi-http.el b/fedi-http.el
index 7e700e0336a..a3f4e7036a1 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 2020-2022 Marty Hiatt and mastodon.el authors
 ;; Author: Marty Hiatt <[email protected]>
 ;; Version: 0.0.2
-;; Package-Requires: ((emacs "27.1"))
 ;; Homepage: https://codeberg.org/martianh/fedi.el
 
 ;; This file is not part of GNU Emacs.
@@ -49,15 +48,16 @@
 ;; (defvar fedi-toot--media-attachment-filenames)
 
 (defvar fedi-instance-url)
-(defvar fedi-http--api-version "v3")
+(defvar fedi-http--api-version)
 
 (defconst fedi-http--timeout 15
   "HTTP request timeout, in seconds.  Has no effect on Emacs < 26.1.")
 
-(defun fedi-http--api (endpoint &optional url)
+(defun fedi-http--api (endpoint &optional url ver-str)
   "Return Fedi API URL for ENDPOINT."
   (concat (or url fedi-instance-url) "/api/"
-          fedi-http--api-version "/" endpoint))
+          (or ver-str fedi-http--api-version)
+          "/" endpoint))
 
 (defun fedi-http--response ()
   "Capture response buffer content as string."

Reply via email to