Type:Calendar - pvande/Tranquil GitHub Wiki

See This Example

    {
      "type": "calendar",
      "url": "/jsonp?url=https://raw.github.com/gist/40f45fcfaa4b71cad1f2/calendar-data.json&callback=?",
    }

Keys

  • url

    The URL to fetch JSONP data from. The name of the JSONP callback function should be represented as a ?, and should be the last query parameter.

  • data

    A Javascript object containing an example of the data being consumed by the widget. This will be used as a stand-in for data from the URL before the initial load, and can be used as a substitute for the URL's data (e.g. for development).

  • interval

    The time to wait before polling url for data updates, in milliseconds. Defaults to one minute.

  • filter

    The name of (or path to) a Javascript function. The named function will be invoked with each JSON object requested, and its return value will be used as the widget's data source. Defaults to the identity function.

  • template

    A Javascript object containing Mustache templates to be used as partials.

    • title

      Used to render the calendar's title. Defaults to '{{title}}'.

    • event

      Used to render each event listing. Defaults to '{{.}}'.

Data

Default (Expected)

    {
      "title": "Calendar Title",
      "events": [ "Event #1", "Event #2", ... "Event #n" ]
    }

Minimum

    {
      "events": [ "Event #1", "Event #2", ... "Event #n" ]
    }