Skip to content

TimVervoort/ical-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ical-viewer

An API to generate a JSON for one or more iCal feeds.

How to use

In index.php, add the iCal URIs which you want to display to the $calendars array.

<?php
    // Which calendars to index
    $calendars = array(
        'https://www.domain.com/link/ical.ics',
        'http://example.org/path/ical'
    );
?>

In index.php, add the iCal URIs which you want to display to the $calendars array.

Navigate to index.php to view the generated JSON. The output will look something like:

{
  "meta": {
    "status": "OK",
    "duration": 1.2
  },
  "data": [
    {
      "date": "2018-12-30",
      "slots": []
    },
    {
      "date": "2018-12-31",
      "slots": [
        {
          "start": "2018-12-31 14:00:00",
          "end": "2018-12-31 20:59:59"
        },
        {
          "start": "2018-12-31 21:00:00",
          "end": "2018-12-31 23:59:59",
          "location": "Hasselt, Belgium",
          "title": "Some title"
        }
      ]
  }]
}

About

Generate JSON feed for multiple (cached) iCal feeds. Works with simple-calendar repo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages