Created
March 31, 2016 05:09
-
-
Save burhanloey/321d45e3ff02e169b95b6f1f7912ab10 to your computer and use it in GitHub Desktop.
Example for using .then() method in SoundCloud API in ClojureScript
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
;; (.then (.then (.connect js/SC) | |
;; (fn [] (.get js/SC "/me"))) | |
;; (fn [me] (js/alert (str "Hello, " (.-username me))))) | |
(.. (.connect js/SC) | |
(then #(.get js/SC "/me")) | |
(then #(js/alert (str "Hello, " (.-username %))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment