Skip to content

Instantly share code, notes, and snippets.

@hexx
Created March 4, 2012 17:22
Show Gist options
  • Save hexx/1973976 to your computer and use it in GitHub Desktop.
Save hexx/1973976 to your computer and use it in GitHub Desktop.
Get Tumblr Avatar
#!/usr/bin/env scalas
!#
/***
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.8"
*/
import dispatch._
val http = new Http
val req = :/("api.tumblr.com") / "v2" / "blog" / "pab-tech.tumblr.com" / "avatar"
val handler = req >>> new java.io.FileOutputStream("cat.png")
http(handler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment