mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[ParksOnTheAirBridge] Fix links (#2590)
This commit is contained in:
parent
f311fb8083
commit
fb0e7ede89
1 changed files with 6 additions and 4 deletions
|
@ -3,7 +3,8 @@
|
|||
class ParksOnTheAirBridge extends BridgeAbstract {
|
||||
const MAINTAINER = 's0lesurviv0r';
|
||||
const NAME = 'Parks On The Air Spots';
|
||||
const URI = 'https://api.pota.app/spot/activator';
|
||||
const URI = 'https://pota.app/#';
|
||||
const API_URI = 'https://api.pota.app/spot/activator';
|
||||
const CACHE_TIMEOUT = 60; // 1m
|
||||
const DESCRIPTION = 'Parks On The Air Activator Spots';
|
||||
|
||||
|
@ -11,16 +12,17 @@ class ParksOnTheAirBridge extends BridgeAbstract {
|
|||
|
||||
$header = array('Content-type:application/json');
|
||||
$opts = array(CURLOPT_HTTPGET => 1);
|
||||
$json = getContents($this->getURI(), $header, $opts);
|
||||
$json = getContents(self::API_URI, $header, $opts);
|
||||
|
||||
$spots = json_decode($json, true);
|
||||
|
||||
foreach ($spots as $spot) {
|
||||
$title = $spot['activator'] . ' @ ' . $spot['reference'] . ' ' .
|
||||
$spot['frequency'] . ' kHz';
|
||||
$park_link = self::URI . '/park/' . $spot['reference'];
|
||||
|
||||
$content = <<<EOL
|
||||
<a href="https://pota.us/#/parks/{$spot['reference']}">
|
||||
<a href="{$park_link}">
|
||||
{$spot['reference']}, {$spot['name']}</a><br />
|
||||
Location: {$spot['locationDesc']}<br />
|
||||
Frequency: {$spot['frequency']} kHz<br />
|
||||
|
@ -29,7 +31,7 @@ Comments: {$spot['comments']}
|
|||
EOL;
|
||||
|
||||
$this->items[] = array(
|
||||
'uri' => 'https://pota.us/#/',
|
||||
'uri' => $park_link,
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'timestamp' => $spot['spotTime']
|
||||
|
|
Loading…
Add table
Reference in a new issue