Accessing SNIPPLR with Groovy and Apache XML-RPC
Copy this code and paste it in your HTML
import org.apache.xmlrpc.client.XmlRpcClient import org.apache.xmlrpc.client.XmlRpcClientConfigImpl
def XmlRpcClientConfigImpl config
= new XmlRpcClientConfigImpl
() config.
setServerURL(new URL("http://snipplr.com/xml-rpc.php"))def XmlRpcClient client
= new XmlRpcClient
() client.setConfig(config)
Object[] params
= ["[yourAPIkey]"] def result
= client.
execute("user.checkkey",params
)
params = ["[yourAPIkey]","groovy"]
result
= client.
execute("snippet.list",params
)
URL: http://www.bighugesystems.com/wordpress/?p=51
Report this snippet
Comments
Subscribe to comments