Guest User

Untitled

a guest
Sep 19th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr/bin/env scalas
  2. !#
  3.  
  4. /***
  5. libraryDependencies += "com.github.hexx" %% "dispatch-tumblr" % "0.0.1"
  6. */
  7.  
  8. import dispatch._
  9. import dispatch.oauth.Consumer
  10. import dispatch.json.JsHttp._
  11.  
  12. import com.github.hexx.dispatch.tumblr._
  13.  
  14. val consumer = Consumer("YOUR CONSUMER KEY", "YOUR CONSUMER SECRET")
  15. val username = "YOUR USERNAME"
  16. val password = "YOUR PASSWORD"
  17.  
  18. val http = new Http
  19. val access_token = http(Auth.access_token(consumer, username, password))
  20. val res = http(User.dashboard(consumer, access_token) posttype "text" limit 5)
  21. res map Post.title foreach println
Add Comment
Please, Sign In to add comment