• Clojure
  • 16 lines
  • 1 fork
  • Pasted by samrat on February 14, 2013
(defn get-session [consumer token]
  (client/post "https://ws.audioscrobbler.com/2.0/"
                (apply str (map (fn [[k v]]
                                  (str k v))
                            {"username" s/user
                             "password" s/password
                             "api_key" s/api-key
                             "api_sig" (sign {:key s/api-key
                                              :secret s/api-secret}
                                             (base-string {:key s/api-key
                                                           :secret s/api-secret}
                                                          {:username s/user
                                                           :password s/password}))}))}
               :throw-entire-message? true))

Did you know? CLOSE

  • There are keyboard shortcuts!
    • When Creating A Paste
      • ALT+P Toggle Private
      • CTRL+Enter Create Paste
      • ALT+W Toggle word wrap
    • When Viewing A Paste
      • ALT+G Go to a line
      • ALT+CTRL+E Edit the paste
      • ALT+R Show the raw code
  • There are URL options!
    • When Creating A Paste
      • ?lang=Javascript to default to javascript
    • When Viewing A Paste
      • #L-N Jump to line number N