Freeplane: query Sourceforge API

This commit is contained in:
Steffen Lange 2022-07-11 10:02:52 +02:00
parent eda2fc2443
commit 4b686a527f

View file

@ -2,11 +2,11 @@
class Freeplane extends PatchBase { class Freeplane extends PatchBase {
function __construct() { function __construct() {
parent::__construct('Freeplane Team', 'Freeplane', 'https://www.freeplane.org/wiki/index.php/Home'); parent::__construct('Freeplane Team', 'Freeplane', 'https://docs.freeplane.org/');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.freeplane.org/wiki/index.php/Home')) if ($this->fetch_json('https://sourceforge.net/projects/freeplane/best_release.json'))
return $this->parse('/\(this downloads the stable version ([\d\.]+)\)/'); return $this->parse_json('filename', '/-([\d\.]+)\.[a-z]+$/');
return false; return false;
} }
} }