Skip to content

Instantly share code, notes, and snippets.

@hexx
Created March 24, 2012 03:54
Show Gist options
  • Save hexx/2178004 to your computer and use it in GitHub Desktop.
Save hexx/2178004 to your computer and use it in GitHub Desktop.
Tumblr Dushboard
#!/usr/bin/env scalas
!#
/***
libraryDependencies += "com.github.hexx" %% "dispatch-tumblr" % "0.0.1"
*/
import dispatch._
import dispatch.oauth.Consumer
import dispatch.json.JsHttp._
import com.github.hexx.dispatch.tumblr._
val consumer = Consumer("YOUR CONSUMER KEY", "YOUR CONSUMER SECRET")
val username = "YOUR USERNAME"
val password = "YOUR PASSWORD"
val http = new Http
val access_token = http(Auth.access_token(consumer, username, password))
val res = http(User.dashboard(consumer, access_token) posttype "text" limit 5)
res map Post.title foreach println
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment