diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-06-12 20:23:25 +0200 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-06-12 20:23:25 +0200 |
| commit | c8260c76683938f58ca66af199bb8b02ac708be8 (patch) | |
| tree | 3e6eaaaa5482a2cc3d45ca8bb0190f5a4d9c5955 /config/services | |
| parent | 23739c7eb1ea9a3eb15e6002ba78000ad20bd5da (diff) | |
rss-bridge: maison de la radio: add parameters
Diffstat (limited to 'config/services')
| -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'; } |
