aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-31 12:48:32 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-31 12:48:32 +0100
commit554dc37b36de840d60d66caf5539c90c02ac2f91 (patch)
treed15850674d5671c16c2627fca55b40d19ccc0c84
parent45a986444101db52dca599f90da7ed063b09d9e8 (diff)
http.el docstrings
-rw-r--r--lisp/mastodon-http.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index f32ccd4..eebfa85 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -74,7 +74,8 @@
This is a thin abstraction over the system
`url-retrieve-synchronously'. Depending on which version of this
-is available we will call it with or without a timeout."
+is available we will call it with or without a timeout.
+SILENT means don't message."
(if (< (cdr (func-arity 'url-retrieve-synchronously)) 4)
(url-retrieve-synchronously url)
(url-retrieve-synchronously url (or silent nil) nil mastodon-http--timeout)))
@@ -141,14 +142,15 @@ Authorization header is included by default unless UNAUTHENTICATED-P is non-nil.
(defun mastodon-http--get (url &optional silent)
"Make synchronous GET request to URL.
-
-Pass response buffer to CALLBACK function."
+Pass response buffer to CALLBACK function.
+SILENT means don't message."
(mastodon-http--authorized-request
"GET"
(mastodon-http--url-retrieve-synchronously url silent)))
(defun mastodon-http--get-json (url &optional silent)
- "Make synchronous GET request to URL. Return JSON response."
+ "Make synchronous GET request to URL. Return JSON response.
+SILENT means don't message."
(with-current-buffer (mastodon-http--get url silent)
(mastodon-http--process-json)))
@@ -187,7 +189,8 @@ Pass response buffer to CALLBACK function."
(defun mastodon-http--get-search-json (url query &optional param silent)
"Make GET request to URL, searching for QUERY and return JSON response.
-PARAM is any extra parameters to send with the request."
+PARAM is any extra parameters to send with the request.
+SILENT means don't message."
(let ((buffer (mastodon-http--get-search url query param silent)))
(with-current-buffer buffer
(mastodon-http--process-json-search))))
@@ -195,7 +198,8 @@ PARAM is any extra parameters to send with the request."
(defun mastodon-http--get-search (base-url query &optional param silent)
"Make GET request to BASE-URL, searching for QUERY.
Pass response buffer to CALLBACK function.
-PARAM is a formatted request parameter, eg 'following=true'."
+PARAM is a formatted request parameter, eg 'following=true'.
+SILENT means don't message."
(mastodon-http--authorized-request
"GET"
(let ((url (if param