mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[RainbowSixSiegeBridge] Fix bridge (#2475)
This commit is contained in:
parent
2811bdc054
commit
d94bb08259
1 changed files with 10 additions and 4 deletions
|
@ -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'];
|
||||
|
|
Loading…
Add table
Reference in a new issue