ajout heimdall

This commit is contained in:
2025-01-01 11:24:01 +01:00
parent f8be42e486
commit c52f60fca9
1477 changed files with 15692 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php namespace App\SupportedApps\Miniflux;
class Miniflux extends \App\SupportedApps implements \App\EnhancedApps {
private const ENDPOINT = 'v1/entries?status=unread';
public $config;
public $attrs = [];
function __construct() {
}
private function setClientOptions() {
if ($this->config->username != '' || $this->config->password != '') {
$this->attrs = ['auth'=> [$this->config->username, $this->config->password]];
}
}
public function test()
{
$this->setClientOptions();
$test = parent::appTest($this->url(self::ENDPOINT), $this->attrs);
echo $test->status;
}
public function livestats()
{
$this->setClientOptions();
$res = parent::execute($this->url(self::ENDPOINT), $this->attrs);
$details = json_decode($res->getBody());
$data['count_unread'] = $details->total;
return parent::getLiveStats('inactive', $data);
}
public function url($endpoint)
{
return parent::normaliseurl($this->config->url).$endpoint;
}
}