1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 12:04:09 +02:00

refactor: logger (#3678)

This commit is contained in:
Dag
2023-09-21 22:05:55 +02:00
committed by GitHub
parent 360f953be8
commit 7329b83cc0
30 changed files with 297 additions and 338 deletions

View File

@@ -113,15 +113,14 @@ class ElloBridge extends BridgeAbstract
private function getAPIKey()
{
$cache = RssBridge::getCache();
$cacheKey = 'ElloBridge_key';
$apiKey = $cache->get($cacheKey);
$apiKey = $this->cache->get($cacheKey);
if (!$apiKey) {
$keyInfo = getContents(self::URI . 'api/webapp-token') or returnServerError('Unable to get token.');
$apiKey = json_decode($keyInfo)->token->access_token;
$ttl = 60 * 60 * 20;
$cache->set($cacheKey, $apiKey, $ttl);
$this->cache->set($cacheKey, $apiKey, $ttl);
}
return $apiKey;