mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 01:55:21 +02:00
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
This commit is contained in:
parent
66568e3a39
commit
4f75591060
398 changed files with 58607 additions and 56442 deletions
|
@ -1,27 +1,28 @@
|
|||
<?php
|
||||
|
||||
class ParksOnTheAirBridge extends BridgeAbstract {
|
||||
const MAINTAINER = 's0lesurviv0r';
|
||||
const NAME = 'Parks On The Air Spots';
|
||||
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';
|
||||
class ParksOnTheAirBridge extends BridgeAbstract
|
||||
{
|
||||
const MAINTAINER = 's0lesurviv0r';
|
||||
const NAME = 'Parks On The Air Spots';
|
||||
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';
|
||||
|
||||
public function collectData() {
|
||||
public function collectData()
|
||||
{
|
||||
$header = ['Content-type:application/json'];
|
||||
$opts = [CURLOPT_HTTPGET => 1];
|
||||
$json = getContents(self::API_URI, $header, $opts);
|
||||
|
||||
$header = array('Content-type:application/json');
|
||||
$opts = array(CURLOPT_HTTPGET => 1);
|
||||
$json = getContents(self::API_URI, $header, $opts);
|
||||
$spots = json_decode($json, true);
|
||||
|
||||
$spots = json_decode($json, true);
|
||||
foreach ($spots as $spot) {
|
||||
$title = $spot['activator'] . ' @ ' . $spot['reference'] . ' ' .
|
||||
$spot['frequency'] . ' kHz';
|
||||
$park_link = self::URI . '/park/' . $spot['reference'];
|
||||
|
||||
foreach ($spots as $spot) {
|
||||
$title = $spot['activator'] . ' @ ' . $spot['reference'] . ' ' .
|
||||
$spot['frequency'] . ' kHz';
|
||||
$park_link = self::URI . '/park/' . $spot['reference'];
|
||||
|
||||
$content = <<<EOL
|
||||
$content = <<<EOL
|
||||
<a href="{$park_link}">
|
||||
{$spot['reference']}, {$spot['name']}</a><br />
|
||||
Location: {$spot['locationDesc']}<br />
|
||||
|
@ -30,12 +31,12 @@ Spotter: {$spot['spotter']}<br />
|
|||
Comments: {$spot['comments']}
|
||||
EOL;
|
||||
|
||||
$this->items[] = array(
|
||||
'uri' => $park_link,
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'timestamp' => $spot['spotTime']
|
||||
);
|
||||
}
|
||||
}
|
||||
$this->items[] = [
|
||||
'uri' => $park_link,
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'timestamp' => $spot['spotTime']
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue