aboutsummaryrefslogtreecommitdiff
path: root/model/Upcoming.php
blob: 1724d0fd60fe88d64738bd6bff029fea7d29ad54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

class Upcoming
{
	public function getNextEvents()
	{
		try {
			$events = file_get_contents('https://c3voc.de/eventkalender/events.json?filter=upcoming');
			$events = json_decode($events, true);

			return array_values($events['voc_events']);
		}
		catch(ErrorException $e)
		{
			return null;
		}
	}
}