To renew the JSON I simply re-export the ics and call the PHP file. I never came around to play with webhooks. That should be possible as well, just never really put time into that.
Not sure if useful, but I use the following PHP ICS parser library for parsing an external .ics file in a Kirby project. Works nicely for me. Probably should have rather been a plugin, but I basically just composer required it on root and use it in the controller like that.
We are still basically using what I wrote 2 years ago… the code is now on Gitlab
We are regenerating once per day, but this is a arbitrary number… if you are interested I can give you all the code
class kalender_update {
private string $cache_file;
private string $ics_file;
// Konstruktor der Klasse, wird beim Erstellen aufgerufen
public function __construct(string $cache_file, string $ics_file)
{
$this->cache_file = $cache_file;
$this->ics_file = $ics_file;
}
/* Die Hauptmethode, die von aussen aufgerufen werden kann
Es wird geprüft, ob der Kalender aktuell ist indem die Cache Datei ausgelesen wird, die einen Datumsschlüssel mit dem Datum des letzten Abgleichs mit dem IServ besitzt
Ist dieser Schlüssel aktuell passiert nichts, ist der Schlüssel nicht aktuell wird eine neue Kalender .ics bei IServ angefragt
*/
public function checkForUpdate()
{
Hi @carsten_kgs this is looking good! I think it might work, in our setup there is a nextcloud calendar that I need to fetch (probably the same way as you did) and then somehow render the content into our layout (I guess fulcalender.io is just one way of doing that second part)