mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-12-18 17:10:29 +03:00
[ForensicArchitecture] Create ForensicArchitectureBridge.php (#4301)
This commit is contained in:
parent
776e27218a
commit
70cf917f09
1 changed files with 25 additions and 0 deletions
25
bridges/ForensicArchitectureBridge.php
Normal file
25
bridges/ForensicArchitectureBridge.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class ForensicArchitectureBridge extends BridgeAbstract
|
||||||
|
{
|
||||||
|
const NAME = 'Forensic Architecture';
|
||||||
|
const URI = 'https://forensic-architecture.org/';
|
||||||
|
const DESCRIPTION = 'Generates content feeds from forensic-architecture.org';
|
||||||
|
const MAINTAINER = 'tillcash';
|
||||||
|
|
||||||
|
public function collectData()
|
||||||
|
{
|
||||||
|
$url = 'https://forensic-architecture.org/api/fa/v1/investigations';
|
||||||
|
$jsonData = json_decode(getContents($url));
|
||||||
|
|
||||||
|
foreach ($jsonData->investigations as $investigation) {
|
||||||
|
$this->items[] = [
|
||||||
|
'content' => $investigation->abstract,
|
||||||
|
'timestamp' => $investigation->publication_date,
|
||||||
|
'title' => $investigation->title,
|
||||||
|
'uid' => $investigation->id,
|
||||||
|
'uri' => self::URI . 'investigation/' . $investigation->slug,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue