Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2. #------------------------------------------------------------------------------------
  3. #
  4. # user_api - a tool to gather information about a chessgames member
  5. #
  6. # This is a "safe API", as it only returns information that you could find by going
  7. # to chessgames.com.
  8. #
  9. # Call this API at http://www.chessgames.com/perl/user_api
  10. #
  11. # >>> WHAT YOU CAN SEND
  12. #
  13. # username = the username requested, case insensitive
  14. #
  15. # hashed_password = the hex SHA256 of a string creatd by taking the ALLCAPS
  16. # version of the username, appending a colon, and then
  17. # appending the password. For example, if user ChessGuy
  18. # has password rhonda89 then this should contain
  19. # SHA256("CHESSGUY:rhonda89")
  20. #
  21. # >>> WHAT YOU GET BACK
  22. #
  23. # error = 0 no errors
  24. # 1 no username received (are you sending the parameters?)
  25. # 2 the username is not on file
  26. # 3 the password provided does not match
  27. #
  28. # username = the username as we have it on file, which may differ
  29. # from the one you send by capitalization
  30. #
  31. # premium = is the user a premium member? 0=false, 1=true
  32. #
  33. # avatar = a URL to the user's avatar. Not sent if there is none.
  34. #
  35. # The output comes back in JSON format, like this
  36. #
  37. # {
  38. # "error": 0,
  39. # "error_desc": "NONE",
  40. # "user": {
  41. # "username": "Obnoxious Jerk",
  42. # "premium": "1",
  43. # "color_light": "EEEEEE",
  44. # "color_dark": "99CC99",
  45. # "avatar": "http://www.chessgames.com/av/face_320.gif"
  46. # }
  47. # }
  48. #
  49. #------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement