Created
October 12, 2015 14:18
-
-
Save steve-ayerhart/ec785eab218dc14e112b to your computer and use it in GitHub Desktop.
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
(require 'cl) | |
(request | |
"https://api.twitch.tv/kraken/streams" | |
:params '(("game" . "StarCraft II") ("limit" . "10")) | |
:parser 'json-read | |
:success (function* | |
(lambda (&key data &allow-other-keys) | |
(when data | |
(with-current-buffer (get-buffer-create "*Sc2 Streamers*") | |
(erase-buffer) | |
(insert (mapconcat (lambda (stream) | |
(let* ((channel (assoc-default 'channel stream)) | |
(name (assoc-default 'name channel))) | |
(format "%s" name))) | |
(assoc-default 'streams data) | |
"\n"))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment