mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-31 07:09:34 +02:00
Merge 29174b927a
into 4c0b97d605
This commit is contained in:
commit
7b2d4b614c
1 changed files with 6 additions and 15 deletions
|
@ -9,20 +9,19 @@ class GOGBridge extends BridgeAbstract
|
||||||
|
|
||||||
public function collectData()
|
public function collectData()
|
||||||
{
|
{
|
||||||
$values = getContents('https://www.gog.com/games/ajax/filtered?limit=25&sort=new');
|
$values = getContents('https://catalog.gog.com/v1/catalog?limit=48&order=desc%3AstoreReleaseDate');
|
||||||
$decodedValues = json_decode($values);
|
$decodedValues = json_decode($values);
|
||||||
|
|
||||||
$limit = 0;
|
$limit = 0;
|
||||||
foreach ($decodedValues->products as $game) {
|
foreach ($decodedValues->products as $game) {
|
||||||
$item = [];
|
$item = [];
|
||||||
$item['author'] = $game->developer . ' / ' . $game->publisher;
|
$item['author'] = implode(', ', $game->developers) . ' / ' . implode(', ', $game->publishers);
|
||||||
$item['title'] = $game->title;
|
$item['title'] = $game->title;
|
||||||
$item['id'] = $game->id;
|
$item['id'] = $game->id;
|
||||||
$item['uri'] = self::URI . $game->url;
|
$item['uri'] = $game->storeLink;
|
||||||
$item['content'] = $this->buildGameContentPage($game);
|
$item['content'] = $this->buildGameContentPage($game);
|
||||||
$item['timestamp'] = $game->globalReleaseDate;
|
|
||||||
|
|
||||||
foreach ($game->gallery as $image) {
|
foreach ($game->screenshots as $image) {
|
||||||
$item['enclosures'][] = $image . '.jpg';
|
$item['enclosures'][] = $image . '.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,18 +41,10 @@ class GOGBridge extends BridgeAbstract
|
||||||
$gameDescriptionValue = json_decode($gameDescriptionText);
|
$gameDescriptionValue = json_decode($gameDescriptionText);
|
||||||
|
|
||||||
$content = 'Genres: ';
|
$content = 'Genres: ';
|
||||||
$content .= implode(', ', $game->genres);
|
$content .= implode(', ', array_column($game->genres, 'name'));
|
||||||
|
|
||||||
$content .= '<br />Supported Platforms: ';
|
$content .= '<br />Supported Platforms: ';
|
||||||
if ($game->worksOn->Windows) {
|
$content .= implode(', ', $game->operatingSystems);
|
||||||
$content .= 'Windows ';
|
|
||||||
}
|
|
||||||
if ($game->worksOn->Mac) {
|
|
||||||
$content .= 'Mac ';
|
|
||||||
}
|
|
||||||
if ($game->worksOn->Linux) {
|
|
||||||
$content .= 'Linux ';
|
|
||||||
}
|
|
||||||
|
|
||||||
$content .= '<br />' . $gameDescriptionValue->description->full;
|
$content .= '<br />' . $gameDescriptionValue->description->full;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue