Owncloud 8 SQL query

oc-internals
9.1.x

#1

Hi,

I finally made the upgrade to 9.1 and im quite impressed by new features im loving it! Yet one feature missing wich is essential to me, custom calendar notifications.
I managed to create a solution for 8.x building a script around these two queries

SELECT calendars.displayname, objects.startdate, objects.enddate, objects.summary FROM oc_clndr_objects objects JOIN oc_clndr_calendars calendars ON objects.calendarid = calendars.id WHERE calendars.userid = 'jsantos' AND DATE(startdate) = DATE(NOW()) ORDER by startdate
SELECT calendars.displayname, objects.startdate, objects.enddate, objects.summary FROM oc_clndr_objects objects JOIN oc_clndr_calendars calendars ON objects.calendarid = calendars.id WHERE calendars.userid = 'jsantos' AND startdate BETWEEN LOCALTIMESTAMP AND LOCALTIMESTAMP+INTERVAL '7 days' ORDER by startdate

It basically sends me an email notification for the events for today and the events for the next 7 days.
Unfortunately in 9.1 im unable to run this script due to the new db schema and also the way wich the data is saved on the database.

So, could you help me in writing a new query or remote API call to get the same functionality ?

Thanks