PSanf2

test script

May 16th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. class = assert(loadfile("pastebin_obj"))
  2. class()
  3. Object = Pastebin:new("api dev key")
  4.  
  5. if Object:login("user name","user password") then
  6.     print("Logged in!")
  7. else
  8.     print("Login Failure")
  9. end
  10.  
  11. local sPaste = Object:get_raw("EdSNvK8t")
  12. print(sPaste)
  13.  
  14.  
  15. local paste_code = "This is my third paste. My program made this paste directly from CraftOS. Yay!"
  16. local paste_name = "This is the third paste, and the first from the program."
  17. local paste_format = "text"
  18.  
  19. local paste_loc = ""
  20.  
  21. paste_loc = Object:put(paste_code,paste_name,paste_format)
  22. print("Paste successful. Paste can be found at "..paste_loc)
Advertisement
Add Comment
Please, Sign In to add comment