Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Latest commit

 

History

History
42 lines (26 loc) · 1.47 KB

README.md

File metadata and controls

42 lines (26 loc) · 1.47 KB

Note: This project is no longer actively maintained and probably won't work in it's current form.

GO XML-RPC Library

This is a library to bring xml-rpc functionality to the GO programming language.

Requirements

The Makefile provided expects you to have setup the environment vairables $GOROOT and $GOARCH as instructed in the Go setup guide. If you do not have these, you can still compile the project manually.

Installation

Go into the 'xmlrpc' sub-directory.
Type 'make install'

This will compile the library and install it in your $GOROOT/pkg directory. It is safe to run this to upgrade the library as well. To remove simply type make nuke in the same directory you typed install.

Usage

Create a new xmlrpc.RemoteMethod with your endpoint and method and the Call it. For example to list all blogs a user has on a wordpress site:

listBlogs := xmlrpc.RemoteMethod{
	Endpoint: "http://examlpe.com/wp/xmlrpc.php",
	Method: "wp.getUsersBlogs",
}

username := "testuser"
password := "hunter2"

result, error := listBlogs.Call(username, password)

result will be of type ParamValue and will require a type assertion to do much with. Read more about ParamValues on the wiki.