Full snipplr API structures and interfaces


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Imports CookComputing.XmlRpc
  2.  
  3. Public Enum SnipplrKey
  4. Valid = 1
  5. Invalid = 0
  6. End Enum
  7.  
  8. Public Enum SnipplrSnippetDelete
  9. Successful = 1
  10. Unseccessful = 0
  11. End Enum
  12.  
  13. Public Structure update
  14. Public datetime As DateTime
  15. Public timezone As String
  16. End Structure
  17.  
  18. Public Structure SnipplrSnippetsList
  19. Public id As String
  20. Public title As String
  21. Public updated As update
  22. End Structure
  23.  
  24. Public Structure SnipplrSnippet
  25. Public id As String
  26. Public user_id As String
  27. Public username As String
  28. Public title As String
  29. Public language As String
  30. Public comment As String
  31. Public created As String
  32. Public updated As String
  33. Public source As String
  34. Public tags As String
  35. Public snipplr_url As String
  36. End Structure
  37.  
  38. <XmlRpcUrl("http://snipplr.com/xml-rpc.php")> _
  39. Public Interface SnipplrIntf
  40. Inherits IXmlRpcProxy
  41.  
  42. <XmlRpcMethod("user.checkkey")> _
  43. Function CheckUserKey(ByVal api_key As String) As Integer
  44.  
  45. <XmlRpcMethod("snippet.list")> _
  46. Function GetSnippetsList(ByVal api_key As String) As SnipplrSnippetsList()
  47.  
  48. <XmlRpcMethod("snippet.get")> _
  49. Function GetSnippet(ByVal snippet_id As String) As SnipplrSnippet
  50.  
  51. <XmlRpcMethod("snippet.post")> _
  52. Function PostSnippet(ByVal api_key As String, ByVal title As String, ByVal code As String, ByVal tags As String, ByVal language As String) As String
  53.  
  54. <XmlRpcMethod("snippet.delete")> _
  55. Function DeleteSnippet(ByVal api_key As String, ByVal snippet_id As String) As Integer
  56.  
  57. End Interface

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.