Created
June 10, 2016 01:45
-
-
Save badri/39653b4cdc8c396b1fac5ed5e3ab7046 to your computer and use it in GitHub Desktop.
leanpub-preview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun leanpub-preview () | |
"Generate a preview of your book @ Leanpub." | |
(interactive) | |
(request | |
"https://leanpub.com/<YOUR-BOOK-SLUG>/preview.json" ;; or better yet, get the book slug from the buffer | |
:type "POST" ;; and construct the URL | |
:data '(("api_key" . "53cr3t")) | |
:parser 'json-read | |
:success (function* | |
(lambda (&key data &allow-other-keys) | |
(message "Preview generation queued at leanpub.com.")))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment