Skip to content

Instantly share code, notes, and snippets.

@ptxmac
Created October 23, 2014 12:29
Show Gist options
  • Save ptxmac/097e551284aca2959f19 to your computer and use it in GitHub Desktop.
Save ptxmac/097e551284aca2959f19 to your computer and use it in GitHub Desktop.
(require 'request)
(defun osaa-state ()
"Get the state of OSAA from spaceapi"
(interactive)
(request "http://spaceapi.osaa.dk/status/json"
:parser 'json-read
:success (function* (lambda (&key data
&allow-other-keys)
(message "The space is: %S" (assoc-default 'state data))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment