Unknown
This commit is contained in:
parent
b651c98b70
commit
d965df33ed
1 changed files with 6 additions and 5 deletions
|
|
@ -18,9 +18,10 @@
|
||||||
(defun quip-api-key ()
|
(defun quip-api-key ()
|
||||||
"Retrieve the stored API key.
|
"Retrieve the stored API key.
|
||||||
|
|
||||||
The API key comes from auth-source, however you have that set up. If you don't
|
The API key comes from auth-source, however you have that set up.
|
||||||
have a key, get one from https://quip.com/api/personal-token. Put it in the
|
If you don't have a key, get one from
|
||||||
password field of an entry for host 'quip'."
|
https://quip.com/api/personal-token. Put it in the password
|
||||||
|
field of an entry for host 'quip'."
|
||||||
(let ((api-key (cadr (auth-source-user-and-password "quip"))))
|
(let ((api-key (cadr (auth-source-user-and-password "quip"))))
|
||||||
(when (not api-key)
|
(when (not api-key)
|
||||||
(error "No API key set for quip in ~/.authinfo"))
|
(error "No API key set for quip in ~/.authinfo"))
|
||||||
|
|
@ -37,8 +38,8 @@ password field of an entry for host 'quip'."
|
||||||
"Make a request to the Quip API, and return the parsed JSON from the response.
|
"Make a request to the Quip API, and return the parsed JSON from the response.
|
||||||
|
|
||||||
A Quip API call involves issuing an HTTP request to path PATH,
|
A Quip API call involves issuing an HTTP request to path PATH,
|
||||||
with method METHOD, and parameters PARAMS. This routine knows the
|
with method METHOD, and parameters PARAMS. This routine knows
|
||||||
base URL and adds the necessary headers."
|
the base URL and adds the necessary headers."
|
||||||
(let
|
(let
|
||||||
((url (concat "https://platform.quip.com/1/" path))
|
((url (concat "https://platform.quip.com/1/" path))
|
||||||
(url-request-method method)
|
(url-request-method method)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue