diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-06-12 20:30:19 +0200 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-06-12 20:30:19 +0200 |
| commit | 0b973c4c4128f2f39acbb61c311104a55157ca8a (patch) | |
| tree | 4859d947443fcdd01e8856d705d4c1bb3d379d97 /config/services/web | |
| parent | 7eb1ec520ebf82f60d00738a886e1f527aab19a4 (diff) | |
| parent | c8260c76683938f58ca66af199bb8b02ac708be8 (diff) | |
Merge branch 'rss-bridge'
Diffstat (limited to 'config/services/web')
| -rw-r--r-- | config/services/web/rss/MaisonDeLaRadioBridge.php | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/config/services/web/rss/MaisonDeLaRadioBridge.php b/config/services/web/rss/MaisonDeLaRadioBridge.php index 2e6037b..9fb0056 100644 --- a/config/services/web/rss/MaisonDeLaRadioBridge.php +++ b/config/services/web/rss/MaisonDeLaRadioBridge.php @@ -11,12 +11,11 @@ $GLOBALS['DATE_FORMATTER'] = new IntlDateFormatter( class MaisonDeLaRadioBridge extends XPathAbstract { const NAME = 'Maison de la Radio Bridge'; - const URI = 'https://www.maisondelaradioetdelamusique.fr/agenda?type=3188'; - const DESCRIPTION = 'Live Radio France concerts at Maison de la Radio.'; + const URI = 'https://www.maisondelaradioetdelamusique.fr/agenda'; + const DESCRIPTION = 'Agenda of the Maison de la Radio et de la Musique.'; const MAINTAINER = 'Quentin Aristote'; - const CACHE_TIMEOUT = 1; // 12h + const CACHE_TIMEOUT = 43200; // 12h - const FEED_SOURCE_URL = 'https://www.maisondelaradioetdelamusique.fr/agenda?type=3188'; const XPATH_EXPRESSION_ITEM = '//a[@class="agenda-event-link"]'; const XPATH_EXPRESSION_ITEM_TITLE = './/h3'; const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@class="summary]'; @@ -26,6 +25,49 @@ class MaisonDeLaRadioBridge extends XPathAbstract { const XPATH_EXPRESSION_ITEM_ENCLOSURES = './/img/@src'; const XPATH_EXPRESSION_ITEM_CATEGORIES = './/span[@class="location"]'; + const PARAMETERS = array( + '' => array ( + 'type' => array( + 'name' => 'Type', + 'type' => 'number', + 'title' => 'ID of the concert type (optional).', + 'exampleValue' => '3188' + ), + 'formation' => array( + 'name' => 'Formation', + 'type' => 'number', + 'title' => 'ID of the performing formation (optional).', + 'exampleValue' => '1035' + ), + 'chef' => array( + 'name' => 'Chef', + 'type' => 'number', + 'title' => 'ID of the conductor (optional).', + 'exampleValue' => '53' + ), + 'compositeur' => array( + 'name' => 'Compositeur', + 'type' => 'number', + 'title' => 'ID of the composer (optional).', + 'exampleValue' => '131' + ), + 'soliste' => array( + 'name' => 'Soliste', + 'type' => 'number', + 'title' => 'ID of the solist (optional).', + 'exampleValue' => '3064' + ) + ) + ); + + public function getSourceUrl() { + $query = ''; + foreach(self::PARAMETERS[''] as $param => $val) { + $query = $query . $param . '=' . $this->getInput($param) . '&'; + } + return self::URI . '?' . $query; + } + public function getIcon() { return 'https://rf-maisondelaradio-production.s3.eu-west-3.amazonaws.com/s3fs-public/mdlrfavicon22.ico'; } |
