{"id":18700,"date":"2012-06-23T03:06:20","date_gmt":"2012-06-23T03:06:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/gallery-plugin-xmlrpc-interface\/"},"modified":"2013-01-10T15:04:49","modified_gmt":"2013-01-10T15:04:49","slug":"gallery-plugin-xmlrpc-interface","status":"publish","type":"plugin","link":"https:\/\/tw.wordpress.org\/plugins\/gallery-plugin-xmlrpc-interface\/","author":9519534,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.3","stable_tag":"trunk","tested":"3.3.2","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"Gallery Plugin XMLRPC Interface","header_author":"Peidong Hu","header_description":"","assets_banners_color":"","last_updated":"2013-01-10 15:04:49","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"bigtester.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2530,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[210,215,14731],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-18700","plugin","type-plugin","status-publish","hentry","plugin_tags-gallery","plugin_tags-photo","plugin_tags-xmlrpc","plugin_committers-zhouyibhic"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/gallery-plugin-xmlrpc-interface.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Basically this plugin creates XMLRPC interfaces for Gallery Plugin. \n Thanks for the author of Extended API, Michael Grosser,  since this plugin has reused the design. \n NOTE: API functions (xmlrpc revoke functions) are all prefixed with 'i_gllrxmlrpc'.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Gallery plugin has to be installed as the pre-requisite condition. You can find Gallery Plugin here, http:\/\/wordpress.org\/extend\/plugins\/gallery-plugin\/<\/li>\n<li>unzip the plugin<\/li>\n<li>Upload plugin folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>In administrator portal, click Settings-&gt;Gallery Plugin XMLRPC Interface to enable\/disable the api functions.<\/li>\n<\/ol>\n\n<p>Warning: Debug Error log is being appended into the WP_CONTENT_DIR . '\/debug.log'; Make sure that in production environment, trun off the debug directive in wp-includes\/default-constants.php<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Exmaple to invoke the xmlrpc api in PHP<\/dt>\n<dd><p>\/\/this example demo how to invoke the api to delete a image in the album\nset_time_limit(0);\nrequire_once(\"IXR_Library.php.inc\");<\/p>\n\n<p>$client-&gt;debug = true; \/\/ Set it to false in Production Environment<\/p>\n\n<p>\/\/ Create the client object\n$client = new IXR_Client('{zonename}','\/xmlrpc.php?delete_images[]={imageID}');<\/p>\n\n<p>$username = \"{admin login name}\"; \n $password = \"{password}\";<\/p>\n\n<p>$function_args = array(array('',$username,$password,'{postID}', array()));\n $params = array($username,$password,\"i_gllrxmlrpc_editpost\", $function_args);<\/p>\n\n<p>\/\/ Run a query To Read Posts From Wordpress\n $ret = $client-&gt;query('gllrxmlrpc_extapi.callGllrMethod', $params);\n if (!$ret) {\n    die('Something went wrong - '.$client-&gt;getErrorCode().' : '.$client-&gt;getErrorMessage());\n }<\/p>\n\n<p>$myresponse = $client-&gt;getResponse();\n print_r($myresponse);<\/p><\/dd>\n<dt>Exmaple to invoke the xmlrpc api in java<\/dt>\n<dd><p>client = new XMLRPCClient(WordPress.currentBlog.getUrl(),\n                    WordPress.currentBlog.getHttpuser(),\n                    WordPress.currentBlog.getHttppassword());<\/p>\n\n<p>Object[] result = null;\n\/\/\nMap&lt;String, String&gt; gallery_type = new HashMap&lt;String, String&gt;();\ngallery_type.put(\"post_type\", \"gallery\");\n\/\/String[] return_fields = {\"post_title\", \"post_type\"};<\/p>\n\n<p>Object[] fArgs = {\"\", WordPress.currentBlog.getUsername(),WordPress.currentBlog.getPassword(),gallery_type};\nObject[] funcArgs = {fArgs};\n\/\/\nObject[] params = { \n        WordPress.currentBlog.getUsername(),\n        WordPress.currentBlog.getPassword(),\n        \"i_gllrxmlrpc_metaweblog_getposts\",\n        funcArgs };\ntry {\n    result = (Object[]) client.call(\"gllrxmlrpc_extapi.callGllrMethod\", params);\n} catch (XMLRPCException e) {\n    errorMsg = e.getMessage();\n}<\/p><\/dd>\n<dt>Exmaple to invoke the delete post api in php<\/dt>\n<dd>debug = true; \/\/ Set it to fase in Production Environment\n\n\/\/ Create the client object\n$client = new IXR_Client('hushanqi.localhost','\/xmlrpc.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&amp;KEY=13505726480152');\n\n $username = \"{user name}\"; \n $password = \"{password}\";\n\n $function_args = array(array('',$username,$password,'99'));\n\n $params = array($username,$password,\"i_gllrxmlrpc_deletepost\", $function_args); \n\n \/\/ Run a query To Read Posts From Wordpress\n if (!$client-&gt;query('gllrxmlrpc_extapi.callGllrMethod', $params)) {\n    die('Something went wrong - '.$client-&gt;getErrorCode().' : '.$client-&gt;getErrorMessage());\n }\n\n $myresponse = $client-&gt;getResponse();\n print_r($myresponse);\n die();\n ?&gt;<\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3<\/h4>\n\n<ul>\n<li>add new interface i_gllrxmlrpc_metaweblog_getPost<\/li>\n<li>new php example of delete post <\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>add new interface i_gllrxmlrpc_metaweblog_getposts to be compliant with metaweblog standard for getposts api.<\/li>\n<li>bug fix in i_gllrxmlrpc_newpost<\/li>\n<li>new example in Java code<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>initial version<\/li>\n<\/ul>","raw_excerpt":"This plugin creates functions for Gallery Plugin which can be XMLRPC invoked remotely.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/18700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=18700"}],"author":[{"embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/zhouyibhic"}],"wp:attachment":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=18700"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=18700"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=18700"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=18700"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=18700"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=18700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}