Skip to:
Content
Pages
Categories
Search
Top
Bottom

XML Classes


  • jamesyeah
    Participant

    @jamesyeah

    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)

  • jschires
    Participant

    @jschires

    are you using the ajax status update like buddypress? I am working on a iphone web app for buddypress but have an issue with it returning the status “clear” and dropping back down. It does slide up and post the update, just doesnt come down with the status, clear, and would like it to also return the post box…any ideas?

Viewing 1 replies (of 1 total)
  • The topic ‘XML Classes’ is closed to new replies.
Skip to toolbar