From 4ca9339e03ce672ec6a604c62610806495674057 Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Sat, 2 May 2015 12:21:17 +0200 Subject: [PATCH] [removed] HumbleStore bridge --- bridges/HumbleStoreDiscountBridge.php | 62 --------------------------- 1 file changed, 62 deletions(-) delete mode 100755 bridges/HumbleStoreDiscountBridge.php diff --git a/bridges/HumbleStoreDiscountBridge.php b/bridges/HumbleStoreDiscountBridge.php deleted file mode 100755 index f9955fbd..00000000 --- a/bridges/HumbleStoreDiscountBridge.php +++ /dev/null @@ -1,62 +0,0 @@ -returnError('Could not request the Humble Store.', 404); - $string = json_decode($result, true); - $items = $string['results']; - $store_link = 'https://www.humblebundle.com/store/p/'; - $limit = 0; - - foreach ($items as $key => $value) { - if ($limit < 10) { - $new_price = $value['current_price'][0] . ' ' . $value['current_price'][1]; - $full_price = $value['full_price'][0] . ' ' . $value['full_price'][1]; - $product_name = $value['human_name']; - $sale_end = (int)$value['sale_end']; - $product_uri = $store_link . $value['machine_name']; - $platforms = str_replace('\'', '', implode("','", $value['platforms'])); - $delivery_methods = str_replace('\'', '', implode("','", $value['delivery_methods'])); - $thumbnail = 'https://www.humblebundle.com' . $value['storefront_featured_image_small']; - - $content = '' . $value['storefront_featured_image_small'] . '

' . $product_name - . '

Current price: ' . $new_price . '
Full price: ' . $full_price .'
Sale ends: '. date(DATE_ATOM, $sale_end) - . '
Developer: ' . $value['developer_name'] . '
Delivery methods: ' . $delivery_methods - . '
Platforms: ' . $platforms . '
' . $value['description']; - - $item = new \Item(); - $item->title = $product_name . ' - ' . $new_price; - $item->uri = $product_uri; - $item->timestamp = $sale_end - 10*24*3600; // just a hack, stamping game as 10 days before sales end (better than no timestamp) - $item->content = $content; - $this->items[] = $item; - $limit++; - } - } - } - - public function getName(){ - return 'HumbleStoreDiscount'; - } - - public function getURI(){ - return 'https://www.humblebundle.com/store'; - } - - public function getCacheDuration(){ - return 21600; // 6 hours - } -}