Created
January 11, 2013 13:24
-
-
Save corecode/4510626 to your computer and use it in GitHub Desktop.
This file contains 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 'url) | |
(require 'json) | |
(url-retrieve "http://api.soundcloud.com/users/corecode/favorites.json?client_id=YOUR_CLIENT_ID" | |
(lambda (status) | |
(message "status: %s" (json-encode status)) | |
(search-forward "\n\n") | |
(let* ((json (buffer-substring (point) (point-max))) | |
(json-object-type 'plist) | |
(json-array-type 'list) | |
(data (json-read))) | |
(dolist (fav data) | |
(message "track %s by %s url `%s'" | |
(plist-get fav :title) | |
(plist-get (plist-get fav :user) :username) | |
(plist-get fav :stream_url)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment