@@ -287,21 +287,22 @@ public function getConfigOptions(Request $request, FeedSource $feedSource, strin
287287 }
288288 } elseif ('subscription ' === $ name ) {
289289 $ query = $ request ->query ->all ();
290+
290291 $ queryParams = [];
291292
292293 if (isset ($ query ['tag ' ])) {
293294 $ tag = $ query ['tag ' ];
294- $ queryParams ['event.tags ' ] = $ tag ;
295+ $ queryParams ['event.tags ' ] = implode ( ' , ' , $ tag) ;
295296 }
296297
297298 if (isset ($ query ['organization ' ])) {
298299 $ organizer = $ query ['organization ' ];
299- $ queryParams ['event.organizer.entityId ' ] = $ organizer ;
300+ $ queryParams ['event.organizer.entityId ' ] = implode ( ' , ' , $ organizer) ;
300301 }
301302
302303 if (isset ($ query ['location ' ])) {
303304 $ location = $ query ['location ' ];
304- $ queryParams ['event.location.entityId ' ] = $ location ;
305+ $ queryParams ['event.location.entityId ' ] = implode ( ' , ' , $ location) ;
305306 }
306307
307308 $ numberOfItems = isset ($ query ['numberOfItems ' ]) ? (int ) $ query ['numberOfItems ' ] : 10 ;
@@ -333,10 +334,9 @@ public function getConfigOptions(Request $request, FeedSource $feedSource, strin
333334 $ queryParams ['location.entityId ' ] = $ location ;
334335 }
335336
336- $ queryParams ['occurrences.start ' ] = date ('c ' );
337- // TODO: Should be based on (end >= now) instead. But not supported by the API.
338- // $queryParams['occurrences.end'] = date('c');
339- // @see https://github.com/itk-dev/event-database-api/blob/develop/src/Api/Dto/Event.php
337+ $ queryParams ['occurrences.end ' ] = [
338+ 'gt ' => date ('c ' ),
339+ ];
340340 }
341341
342342 $ queryParams ['itemsPerPage ' ] = $ query ['itemsPerPage ' ] ?? 10 ;
@@ -421,10 +421,9 @@ private function getSubscriptionData(FeedSource $feedSource, array $queryParams
421421
422422 $ queryParams ['itemsPerPage ' ] = $ itemsPerPage ;
423423
424- $ queryParams ['start ' ] = date ('c ' );
425- // TODO: Should be based on (end >= now) instead. But not supported by the API.
426- // $queryParams['occurrences.end'] = date('c');
427- // @see https://github.com/itk-dev/event-database-api/blob/develop/src/Api/Dto/Event.php
424+ $ queryParams ['end ' ] = [
425+ 'gt ' => date ('c ' )
426+ ];
428427
429428 do {
430429 $ queryParams ['page ' ] = $ page ;
0 commit comments