@@ -287,21 +287,22 @@ public function getConfigOptions(Request $request, FeedSource $feedSource, strin
287
287
}
288
288
} elseif ('subscription ' === $ name ) {
289
289
$ query = $ request ->query ->all ();
290
+
290
291
$ queryParams = [];
291
292
292
293
if (isset ($ query ['tag ' ])) {
293
294
$ tag = $ query ['tag ' ];
294
- $ queryParams ['event.tags ' ] = $ tag ;
295
+ $ queryParams ['event.tags ' ] = implode ( ' , ' , $ tag) ;
295
296
}
296
297
297
298
if (isset ($ query ['organization ' ])) {
298
299
$ organizer = $ query ['organization ' ];
299
- $ queryParams ['event.organizer.entityId ' ] = $ organizer ;
300
+ $ queryParams ['event.organizer.entityId ' ] = implode ( ' , ' , $ organizer) ;
300
301
}
301
302
302
303
if (isset ($ query ['location ' ])) {
303
304
$ location = $ query ['location ' ];
304
- $ queryParams ['event.location.entityId ' ] = $ location ;
305
+ $ queryParams ['event.location.entityId ' ] = implode ( ' , ' , $ location) ;
305
306
}
306
307
307
308
$ numberOfItems = isset ($ query ['numberOfItems ' ]) ? (int ) $ query ['numberOfItems ' ] : 10 ;
@@ -333,10 +334,9 @@ public function getConfigOptions(Request $request, FeedSource $feedSource, strin
333
334
$ queryParams ['location.entityId ' ] = $ location ;
334
335
}
335
336
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
+ ];
340
340
}
341
341
342
342
$ queryParams ['itemsPerPage ' ] = $ query ['itemsPerPage ' ] ?? 10 ;
@@ -421,10 +421,9 @@ private function getSubscriptionData(FeedSource $feedSource, array $queryParams
421
421
422
422
$ queryParams ['itemsPerPage ' ] = $ itemsPerPage ;
423
423
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
+ ];
428
427
429
428
do {
430
429
$ queryParams ['page ' ] = $ page ;
0 commit comments