AppFetcher: Distinguish between fileName and endpointName

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2020-01-09 17:29:00 +01:00
parent 31c74e87c8
commit 2f89f5fd13
No known key found for this signature in database
GPG key ID: 9D98FD9380A1CB43
4 changed files with 1867 additions and 1781 deletions

View file

@ -68,6 +68,7 @@ class AppFetcher extends Fetcher {
);
$this->fileName = 'apps.json';
$this->endpointName = 'apps.json';
$this->compareVersion = $compareVersion;
$this->ignoreMaxVersion = true;
}

View file

@ -53,5 +53,6 @@ class CategoryFetcher extends Fetcher {
$logger
);
$this->fileName = 'categories.json';
$this->endpointName = 'categories.json';
}
}

View file

@ -55,6 +55,8 @@ abstract class Fetcher {
/** @var string */
protected $fileName;
/** @var string */
protected $endpointName;
/** @var string */
protected $version;
/** @var string */
protected $channel;
@ -219,6 +221,6 @@ abstract class Fetcher {
}
protected function getEndpoint(): string {
return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->fileName;
return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName;
}
}

File diff suppressed because one or more lines are too long