Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 20, 200915 yr So, there's this cool API right that I can use to integrate other apps right? WRONG! It seems the XMLRPC API only allows fetching data from IPBoard, not putting to it (with the exception of posting topics and replies). I'd really love it if this could be fleshed out so that I can actually modify members via the XMLRPC API. Before you suggest just using IPSMember::load, that won't work - an ASP.NET application cannot execute PHP for obvious reasons. I can use direct SQL writes, but the member DB schema is terrible (a DB column per custom profile field?!?) and I prefer not to allow any of my apps to access other apps data directly so I'd rather not. The short version is - more updateability via the XML RPC API please.
September 21, 200915 yr It would definitely be nice to have more API functions, and I'm sure there will be more added in the future, but I don't know what version that will be.
September 24, 200915 yr Thanks. I´m trying to develop a iphone app to read from ipboard and write new posts... How can i get all the forums? The method 'fetchForums' only returns info about the forumids specified as param. Should i write my own xmlrpc api to fetchForums with parentid 'x' ? where x can be 'root' or any forumid? Is possible with only one api_key write post for multiple users? how can i authenticate a user/password with this apis? (if possible) if is not possible, can you tell me any function i can call to verify user/password and write my own api? Thanks I added my own fechAllForums to methods (same as fechForums changing the call to getForumList), but now i need to know how to add permission to my user api to run this method, because the authenticate method returns false. I can see in the api_user bd table the permissions list, but dont know what should i add to run this new fecthAllForums method. Can you help me? Thanks $ALLOWED_METHODS['fetchAllForums'] = array( 'in' => array( 'api_key' => 'string', 'api_module' => 'string', 'forum_ids' => 'string', 'view_as_guest' => 'integer', ), 'out' => array( 'response' => 'xmlrpc' ) ); public function fetchAllForums( $api_key, $api_module, $forum_ids, $view_as_guest ) { //----------------------------------------- // INIT //----------------------------------------- $api_key = IPSText::md5Clean( $api_key ); $api_module = IPSText::parseCleanValue( $api_module ); $forum_ids = ( $forum_ids ) ? explode( ',', IPSText::parseCleanValue( $forum_ids ) ) : null; $view_as_guest = intval( $view_as_guest ); //----------------------------------------- // Authenticate //----------------------------------------- if ( $this->__authenticate( $api_key, $api_module, 'fetchAllForums' ) !== FALSE ) { //----------------------------------------- // Add log //----------------------------------------- if ( ipsRegistry::$settings['xmlrpc_log_type'] != 'failed' ) { $this->registry->DB()->insert( 'api_log', array( 'api_log_key' => $api_key, 'api_log_ip' => $_SERVER['REMOTE_ADDR'], 'api_log_date' => time(), 'api_log_query' => $this->classApiServer->raw_request, 'api_log_allowed' => 1 ) ); } //----------------------------------------- // Get some classes //----------------------------------------- require_once( IPSLib::getAppDir( 'forums' ) . '/app_class_forums.php' ); $appClass = new app_class_forums( $this->registry ); //----------------------------------------- // Fetch forum list //----------------------------------------- //$return = array(); // foreach( $forum_ids as $id ) // { // $return[] = $this->registry->getClass('class_forums')->forumsFetchData( $id ); // } //$return[] = $this->registry->getClass('class_forums')->getForumList(); //----------------------------------------- // Return the data //----------------------------------------- //$this->classApiServer->apiSendReply( $return ); $this->classApiServer->apiSendReply( $this->registry->getClass('class_forums')->getForumList()); exit(); } }
September 24, 200915 yr I answer myself: Now my new method appears at admin control panel at API Users.... Anyone can tell me the method to validate user/password i can use from XMLRPC API????
September 24, 200915 yr If you're looking to fetch data from IPB, there's also the XML feed which may help you: http://community.invisionpower.com/xml.php
September 24, 200915 yr If you're looking to fetch data from IPB, there's also the XML feed which may help you: http://community.invisionpower.com/xml.php Not just fetch data, i
September 24, 200915 yr Answering myself again: IPSMember have the function i need to authenticate user/password..... I did the test with php xlmrpc calls...so now, with all i need ok, i will start the iphone development :)
September 28, 200915 yr mmmm.....Does Anyone knows any class/function to search in forum?? I need the function to call it from my xmlrpc functions. Thanks
July 7, 201212 yr Reviving old thread. How exactly do you enable the XML Feed in the first place? I cant seem to find an option for it..
Archived
This topic is now archived and is closed to further replies.