mirror of
https://github.com/SqrtMinusOne/elfeed-sync.git
synced 2025-12-10 12:03:03 +03:00
feat(php): API works
This commit is contained in:
parent
d1e4646b09
commit
598bdb2d76
2 changed files with 15 additions and 6 deletions
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Installation
|
||||
- Clone the repo to the `plugins.local` folder
|
||||
- Add `elfeed_sync` to the `TTRSS_PLUGINS` variable
|
||||
18
init.php
18
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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue