diff --git a/bridges/RainbowSixSiegeBridge.php b/bridges/RainbowSixSiegeBridge.php index 144b806a..2d0762bd 100644 --- a/bridges/RainbowSixSiegeBridge.php +++ b/bridges/RainbowSixSiegeBridge.php @@ -7,14 +7,20 @@ class RainbowSixSiegeBridge extends BridgeAbstract { const CACHE_TIMEOUT = 7200; // 2h const DESCRIPTION = 'Latest news about Rainbow Six Siege'; + // API key to call Ubisoft API, extracted from the React frontend + const NIMBUS_API_KEY = '3u0FfSBUaTSew-2NVfAOSYWevVQHWtY9q3VM8Xx9Lto'; + public function getIcon() { - return 'https://static-dm.akamaized.net/siege/prod/favicon-144x144.png'; + return 'https://static-dm.akamaized.net/siege/prod/favicon.ico'; } public function collectData(){ - $dlUrl = 'https://www.ubisoft.com/api/updates/items?locale=en-us&categoriesFilter=all'; - $dlUrl = $dlUrl . '&limit=6&mediaFilter=news&skip=0&startIndex=undefined&tags=BR-rainbow-six%20GA-siege'; - $jsonString = getContents($dlUrl); + $dlUrl = 'https://nimbus.ubisoft.com/api/v1/items?categoriesFilter=all'; + $dlUrl = $dlUrl . '&limit=6&mediaFilter=all&skip=0&startIndex=0&tags=BR-rainbow-six%20GA-siege'; + $dlUrl = $dlUrl . '&locale=en-us&fallbackLocale=en-us&environment=master'; + $jsonString = getContents($dlUrl, array( + 'Authorization: ' . self::NIMBUS_API_KEY + )); $json = json_decode($jsonString, true); $json = $json['items'];