M_NextGen_XmlRpc

The NextGEN Gallery M NextGen XmlRpc class.

Defined (1)

The class is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_xmlrpc/module.nextgen_xmlrpc.php  
  1. class M_NextGen_XmlRpc extends C_Base_Module 
  2. function define($id = 'pope-module',  
  3. $name = 'Pope Module',  
  4. $description = '',  
  5. $version = '',  
  6. $uri = '',  
  7. $author = '',  
  8. $author_uri = '',  
  9. $context = FALSE) 
  10. parent::define( 
  11. 'photocrati-nextgen_xmlrpc',  
  12. 'NextGEN Gallery XML-RPC',  
  13. 'Provides an XML-RPC API for NextGEN Gallery',  
  14. '0.6',  
  15. 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',  
  16. 'Imagely',  
  17. 'https://www.imagely.com' 
  18. ); 
  19.  
  20. function get_type_list() 
  21. return array( 
  22. 'C_NextGen_API' => 'class.nextgen_api.php',  
  23. 'C_NextGen_API_XMLRPC' => 'class.nextgen_api_xmlrpc.php',  
  24. 'A_NextGen_API_Ajax' => 'adapter.nextgen_api_ajax.php',  
  25. ); 
  26.  
  27. function _register_utilities() 
  28. $this->nextgen_api = C_NextGen_API::get_instance(); 
  29. $this->nextgen_api_xmlrpc = C_NextGen_API_XMLRPC::get_instance(); 
  30.  
  31. function _register_hooks() 
  32. add_filter('xmlrpc_methods', array($this, 'add_methods') ); 
  33.  
  34. function _register_adapters() 
  35. // Provides AJAX actions for the JSON API interface 
  36. $this->get_registry()->add_adapter( 
  37. 'I_Ajax_Controller', 'A_NextGen_API_Ajax' 
  38. ); 
  39.  
  40. function add_methods($methods) 
  41. $methods['ngg.installed'] = array($this->nextgen_api_xmlrpc, 'get_version'); 
  42. $methods['ngg.setPostThumbnail'] = array($this->nextgen_api_xmlrpc, 'set_post_thumbnail'); 
  43.  
  44. // Image methods 
  45. $methods['ngg.getImage'] = array($this->nextgen_api_xmlrpc, 'get_image'); 
  46. $methods['ngg.getImages'] = array($this->nextgen_api_xmlrpc, 'get_images'); 
  47. $methods['ngg.uploadImage'] = array($this->nextgen_api_xmlrpc, 'upload_image'); 
  48. $methods['ngg.editImage'] = array($this->nextgen_api_xmlrpc, 'edit_image'); 
  49. $methods['ngg.deleteImage'] = array($this->nextgen_api_xmlrpc, 'delete_image'); 
  50.  
  51. // Gallery methods 
  52. $methods['ngg.getGallery'] = array($this->nextgen_api_xmlrpc, 'get_gallery'); 
  53. $methods['ngg.getGalleries'] = array($this->nextgen_api_xmlrpc, 'get_galleries'); 
  54. $methods['ngg.newGallery'] = array($this->nextgen_api_xmlrpc, 'create_gallery'); 
  55. $methods['ngg.editGallery'] = array($this->nextgen_api_xmlrpc, 'edit_gallery'); 
  56. $methods['ngg.deleteGallery'] = array($this->nextgen_api_xmlrpc, 'delete_gallery'); 
  57.  
  58. // Album methods 
  59. $methods['ngg.getAlbum'] = array($this->nextgen_api_xmlrpc, 'get_album'); 
  60. $methods['ngg.getAlbums'] = array($this->nextgen_api_xmlrpc, 'get_albums'); 
  61. $methods['ngg.newAlbum'] = array($this->nextgen_api_xmlrpc, 'create_album'); 
  62. $methods['ngg.editAlbum'] = array($this->nextgen_api_xmlrpc, 'edit_album'); 
  63. $methods['ngg.deleteAlbum'] = array($this->nextgen_api_xmlrpc, 'delete_album'); 
  64.  
  65. return $methods;