This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
celtic_game [2020/12/20 17:14] admin created |
celtic_game [2020/12/20 17:19] (current) admin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Matrix bot task: Celtic game warning ====== | ====== Matrix bot task: Celtic game warning ====== | ||
| + | |||
| + | I want to know if the pub is gonna be busy or if certain friends might not be available, so I need to know when Celtic games are on. | ||
| The first hit when I searched 'celtic games' was this [[https://www.skysports.com/celtic-fixtures|Sky Sports: Celtic Fixtures]] page. Luckily they provide an iCal feed of the games. I used the [[https://sabre.io/vobject/icalendar/|Sabre VObject PHP class]] to parse their [[webcal://www.skysports.com/calendars/football/fixtures/teams/celtic?live=false|calendar file]]. | The first hit when I searched 'celtic games' was this [[https://www.skysports.com/celtic-fixtures|Sky Sports: Celtic Fixtures]] page. Luckily they provide an iCal feed of the games. I used the [[https://sabre.io/vobject/icalendar/|Sabre VObject PHP class]] to parse their [[webcal://www.skysports.com/calendars/football/fixtures/teams/celtic?live=false|calendar file]]. | ||
| + | |||
| + | Install VObject using composer: | ||
| + | <code bash> | ||
| + | cd projectdir | ||
| + | composer require sabre/vobject ~4.1 | ||
| + | </code> | ||
| <code php celtic-warning.php> | <code php celtic-warning.php> | ||