Advertisement
Guest User

textgears-check-api

a guest
Nov 14th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.40 KB | None | 0 0
  1. (defun textgears-check-api (text)
  2.   (with-current-buffer
  3.       (url-retrieve-synchronously
  4.        (concat "https://api.textgears.com/check.php?"
  5.                (url-build-query-string `((text ,text)
  6.                                          (key "DEMO_KEY")))))
  7.     (if (not (url-http-parse-headers))
  8.         (error "network error")
  9.       (search-forward-regexp "\n\\s-*\n" nil t)
  10.       (json-read))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement