branch: elpa/fedi
commit fbb8f591c59117d68aa151bc9d639a1989c8d35f
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>
fedi-http--api add optional url arg, for pkg's own instance-url var
---
fedi-http.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fedi-http.el b/fedi-http.el
index 85ef9f97c26..3db72b17380 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -54,9 +54,9 @@
(defconst fedi-http--timeout 15
"HTTP request timeout, in seconds. Has no effect on Emacs < 26.1.")
-(defun fedi-http--api (endpoint)
+(defun fedi-http--api (endpoint &optional url)
"Return Fedi API URL for ENDPOINT."
- (concat fedi-instance-url "/api/"
+ (concat (or url fedi-instance-url) "/api/"
fedi-http--api-version "/" endpoint))
(defun fedi-http--response ()