From 7aa54602cfe0b5ed2ea91c0588fd80057fa6eb59 Mon Sep 17 00:00:00 2001 From: Tobias Alexander Franke Date: Wed, 4 Jun 2025 22:15:28 +0200 Subject: [PATCH] [FabBridge] Pull 100% discounted items via Fab API (#4584) * [FabBridge] Pull 100% discounted items via Fab API * [FabBridge] Linter fixes --- bridges/FabBridge.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 bridges/FabBridge.php diff --git a/bridges/FabBridge.php b/bridges/FabBridge.php new file mode 100644 index 00000000..6596f869 --- /dev/null +++ b/bridges/FabBridge.php @@ -0,0 +1,43 @@ +results as $item) { + $thumbnail = $item->thumbnails[0]->mediaUrl; + $itemurl = static::URI . '/listings/' . $item->uid; + + $itemapiurl = static::URI . '/i/listings/' . $item->uid; + $itemjson = getContents($itemapiurl, $header); + $itemjson = json_decode($itemjson); + + $this->items[] = [ + 'title' => $item->title, + 'author' => $item->user->sellerName, + 'uri' => $itemurl, + 'timestamp' => strtotime($item->lastUpdatedAt), + 'content' => '' . $itemjson->description, + ]; + } + } +}