HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Extending API (http://www.howtoforge.com/forums/showthread.php?t=60352)

Xenocide 28th January 2013 13:57

Extending API
 
Hi Guys,

Is it possible to extend the API using plugins?

I just want to add functions like sites_get_domain_by_domainname etc to check a site exists before creating it but obviously don't want to edit the core files.

Cheers

Xenocide 28th January 2013 16:23

If I were to make a new file and include it from the config file (doesn't get over written?) and made a class which extends the remoting class, then changed interface/web/remote.index.php to read $app->load('remoting_other_class');.. would that work?

till 28th January 2013 18:26

Quote:

Is it possible to extend the API using plugins?
No.

Quote:

I just want to add functions like sites_get_domain_by_domainname etc to check a site exists before creating it but obviously don't want to edit the core files.
No need to add a new function for that, you can esily do this with the current functions:

$domain_record = $client->sites_web_domain_get($session_id, array('domain' => 'mydomain.tld'));

Xenocide 28th January 2013 18:31

You blow my mind. Thank you. Fantastic!!


All times are GMT +2. The time now is 04:22.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.