aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-04-05 17:31:44 +0200
committermousebot <mousebot@riseup.net>2022-04-05 17:31:44 +0200
commitb3649a12a398537ade7136d704f2f05ccc856e23 (patch)
tree60a0972a20b3021403e97c1b6baf7a8d6e79cf5d /lisp/mastodon-http.el
parentf7de456e918fdde1c7728e6fe435d9d40d98dd4b (diff)
parentfb69058495574a73df17856014c42370b23d81d7 (diff)
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index e288c18..35fd070 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -32,6 +32,7 @@
(require 'json)
(require 'request) ; for attachments upload
+(require 'url)
(defvar mastodon-instance-url)
(defvar mastodon-toot--media-attachment-ids)
@@ -156,6 +157,13 @@ Pass response buffer to CALLBACK function."
(with-temp-buffer
(mastodon-http--url-retrieve-synchronously url))))
+(defun mastodon-http--append-query-string (url params)
+ "Append PARAMS to URL as query strings and return it.
+
+PARAMS should be an alist as required `url-build-query-string'."
+ (let ((query-string (url-build-query-string params)))
+ (concat url "?" query-string)))
+
;; search functions:
(defun mastodon-http--process-json-search ()
"Process JSON returned by a search query to the server."