From 79f9bef767ba0e0a35c8bf8411bb90feac35a551 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Apr 2013 08:18:43 +0400 Subject: add support for plugins adding API methods --- plugins/example_api/init.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/example_api/init.php (limited to 'plugins/example_api/init.php') diff --git a/plugins/example_api/init.php b/plugins/example_api/init.php new file mode 100644 index 000000000..a5f34b865 --- /dev/null +++ b/plugins/example_api/init.php @@ -0,0 +1,31 @@ +link = $host->get_link(); + $this->host = $host; + + $host->add_api_method("example_testmethod", $this); + } + + function example_testmethod() { + return array(API::STATUS_OK, array("current_time" => time())); + } +} +?> -- cgit v1.2.3