aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-10-22 18:27:05 +0200
committermousebot <mousebot@riseup.net>2021-10-22 18:27:05 +0200
commit270ed20ecb566ec06347f2d60f1720ded09792eb (patch)
treeff0e9495213d28312196aceb9ab59172be59bb20 /lisp/mastodon-http.el
parent7ba038a8c356ff7df4885485a2f4fe69e67cfc34 (diff)
parent24adbf94613d1cbeee08db896388e1d7f854a168 (diff)
Merge branch 'develop' into imgcaching
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 6df2aab..f092a2d 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -46,7 +46,7 @@
"HTTP request timeout, in seconds. Has no effect on Emacs < 26.1.")
(defun mastodon-http--api (endpoint)
- "Return Mastondon API URL for ENDPOINT."
+ "Return Mastodon API URL for ENDPOINT."
(concat mastodon-instance-url "/api/"
mastodon-http--api-version "/" endpoint))
@@ -114,7 +114,7 @@ Authorization header is included by default unless UNAUTHENTICED-P is non-nil."
(url-retrieve-synchronously url nil nil mastodon-http--timeout)))))
(defun mastodon-http--read-file-as-string (filename)
- ""
+ "Read a file FILENAME as a string. Used to generate image preview."
(with-temp-buffer
(insert-file-contents filename)
(string-to-unibyte (buffer-string))))
@@ -170,7 +170,8 @@ Pass response buffer to CALLBACK function."
(json-read-from-string json-string)))
(defun mastodon-http--get-search-json (url query &optional param)
- "Make GET request to URL, searching for QUERY and return JSON response."
+ "Make GET request to URL, searching for QUERY and return JSON response.
+PARAM is any extra parameters to send with the request."
(let ((buffer (mastodon-http--get-search url query param)))
(with-current-buffer buffer
(mastodon-http--process-json-search))))