From 833f7141056396c0c911ef3e844f222ee701323c Mon Sep 17 00:00:00 2001 From: Tobias Alexander Franke Date: Tue, 3 Jun 2025 16:39:03 +0200 Subject: [PATCH] [FabBridge] Pull 100% discounted items via Fab API --- 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..e08baa4e --- /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, + ]; + } + } +}