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