1
0
Fork 0

Add docstring

This commit is contained in:
Bram Schoenmakers 2024-02-23 22:58:36 +01:00
parent eb846635a0
commit bad0c2a50e
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

View file

@ -249,9 +249,12 @@ https://help.kagi.com/kagi/api/fastgpt.html for more information."
"--header" "Content-Type: application/json"
"--data" "@-")))
(defun kagi--call-api (obj url)
(defun kagi--call-api (object url)
"Submit the OBJECT to the API end-point at URL.
The OBJECT will be JSON encoded and sent as HTTP POST data."
(with-temp-buffer
(insert (json-encode obj))
(insert (json-encode object))
(let* ((call-process-flags '(nil nil "curl" t t nil))
(curl-flags (kagi--curl-flags))
(all-flags (append call-process-flags