Closed bensteUEM closed 1 year ago
Suggestion -> get_events(next:true) to keep common method structure.
if really required add param for return type event or id
Okay - the actual existing function is defined as get_events(self, event_id=None). Shall I change it to get_events(self, event=next) whereas the "event" parameter accepts:
In my opinion 'next' would be a good default-value.
I would suggest keeping the existing optional "event_id" param and add a new optional "limit" param which limits the the number of results, in addition to a new optional "sort" param which default to ID but can be changed to event_date
This would enable the use of one multi puprose function and if used with limit=1 and sort="event_date" implement the requested "next event" functionality
i had a look at the original API again ... there was also an existing bug report which relates to this ... please see https://elkw1610.krz.tools/api/ Events endpoint for the params to use
Best would be to implement the same params as with the API ...
i would suggest marking this issue as duplicate of #2 ? Feel free to solve it ...
closed as duplicate of #2
Aus https://forum.songbeamer.de/viewtopic.php?f=1&p=23001&sid=d7f00735d9dccdcc0eb7ba89baa0e489#p23001 Implementierung von kolibri52 aber noch nicht geteilt.