XML Classes
-
Hey,
Currently working on the iPhone app and it is going well, however when I started I realised that the XML-RPC plugin I was using can only make calls for group data, I really need to add profile and friend data to this, I’ve tried adding the classes but I must be doing it wrong, does anyone have any idea how I might add the other classes?
Here is a snippet from the current code:
class BPDEV_XMLRPC_Groups {
function methods() {
/* Passive */
BPDEV_XMLRPC::add_method( 'bp.getGroup', array( 'BPDEV_XMLRPC_Groups', 'get_group' ) );
BPDEV_XMLRPC::add_method( 'bp.getGroupMembers', array( 'BPDEV_XMLRPC_Groups', 'get_members' ) );
BPDEV_XMLRPC::add_method( 'bp.getGroupNews', array( 'BPDEV_XMLRPC_Groups', 'get_news' ) );
BPDEV_XMLRPC::add_method( 'bp.getGroupDescription', array( 'BPDEV_XMLRPC_Groups', 'get_description' ) );
BPDEV_XMLRPC::add_method( 'bp.getGroupMeta', array( 'BPDEV_XMLRPC_Groups', 'get_meta' ) );
/* Active */
BPDEV_XMLRPC::add_method( 'bp.newGroup', array( 'BPDEV_XMLRPC_Groups', 'create_group' ) );
BPDEV_XMLRPC::add_method( 'bp.setGroupNews', array( 'BPDEV_XMLRPC_Groups', 'set_news' ) );
BPDEV_XMLRPC::add_method( 'bp.setGroupDescription', array( 'BPDEV_XMLRPC_Groups', 'set_description' ) );
BPDEV_XMLRPC::add_method( 'bp.setGroupName', array( 'BPDEV_XMLRPC_Groups', 'set_name' ) );
BPDEV_XMLRPC::add_method( 'bp.delGroup', array( 'BPDEV_XMLRPC_Groups', 'delete_group' ) );
BPDEV_XMLRPC::add_method( 'bp.newGroupWire', array( 'BPDEV_XMLRPC_Groups', 'post_wire' ) );
}
/**
* BPDEV_XMLRPC_Groups::get_group()
*
* Get all datas for the group_id
*
* @param array ( 'username', 'password', group_id )
* @return object $group All datas for the group_id
*
*/
function get_group ( $args = array( 'username', 'password', 'group_id' ) ) {
$user_login = $args[0];
$user_pass = $args[1];
$group_id = (int)$args[2];
if ( !BPDEV_XMLRPC_User::authenticate ( $user_login, $user_pass ) ) return false;
$group = new BP_Groups_Group( (int)$group_id );
return $group;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘XML Classes’ is closed to new replies.