diff --git a/README.md b/README.md new file mode 100644 index 0000000..60d60a3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Installation +- Clone the repo to the `plugins.local` folder +- Add `elfeed_sync` to the `TTRSS_PLUGINS` variable diff --git a/init.php b/init.php index 922e332..188c7e0 100644 --- a/init.php +++ b/init.php @@ -3,17 +3,23 @@ class Elfeed_Sync extends Plugin { private $host; function about() { - return array(1.0, "Elfeed Sync", "Sync API for elfeed", false, "http://example.com"); + return array(null, "Elfeed Sync", "Sync API for elfeed", true); } function api_version() { - return 1; - } - function init($host) { - $this->host = $host; + return 2; } - function testMethod() { + function init($host) { + $this->host = $host; + + $this->host->add_api_method("kek", $this); + } + + /** + * Our own API. + */ + function kek() { return array(API::STATUS_OK, array("ok" => true)); } }