summaryrefslogtreecommitdiff
path: root/config/services/web/rss
diff options
context:
space:
mode:
Diffstat (limited to 'config/services/web/rss')
-rw-r--r--config/services/web/rss/MaisonDeLaRadioBridge.php50
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';
}