aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
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-11-05 15:41:27 +0100
commit1c1e8281d22fe6cd0fb40925fb5efa22c11e7dd3 (patch)
tree7601a1ce347d3f3b4afcfb3bc74cffa2514f643c /lisp/mastodon-http.el
parentbcf418d78366c356ab11d0feba3fd1996782af8f (diff)
http.el docstrings
Diffstat (limited to 'lisp/mastodon-http.el')
-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