University of Southern California

ITS Web Services


Event Output


Overview

The Event Output system was designed to connect USC’s Event Calendar to your individual or school calendar. With Event Output, you can exchange and synchronize event data entered into any USC Event Calendar with your individual or school calendar. The data exchange formats supported by the Event Output: HTML, XML, JSON, RSS, or iCal (sometimes called ICS).

This document provides instructions for specifying the necessary parameters to output the calendar in the desired format.

( NOTE: A list of calendars can be found at http://web-app.usc.edu/ws/eo2/calendar and a list of simple feed formats can be found here http://web-app.usc.edu/ws/eo2/help/eo2_feeds.txt)

Uses

Description Use
HTML Read the calendar in your web browser
RSS Feed Read events in an RSS Reader
iCal Feed Import into your personal or departmental calendar
Google Calendar Read in Google Calendar
JSON Integrate into your web page or wed application
JSONP (JSON + padding) Integrate into your web page via Javascript

Viewing your calendar

You can view your calendar output by typing the calendar id in the address bar of your browser and specifying the format. The URL will include the calendar id and will display a format based on what you input. Notice that the URL remains the same for each instance of the calendar, except for the format variable.

Output URL with the format variable
HTML http://web-app.usc.edu/ws/eo2/calendar/32/list
XML http://web-app.usc.edu/ws/eo2/xml/32/list
iCal http://web-app.usc.edu/ws/eo2/ics/32/list
JSON http://web-app.usc.edu/ws/eo2/json/32/list
JSONP
(with callback function
named eventList)
http://web-app.usc.edu/ws/eo2/json/32/list?jsonp_callback=eventList

What will that display:

The output will display all current and future calendar events for the specified calendar. Past events will only display if you specify a date range which includes the past date. Similarly, you can view only future events up until a certain date with a date range query. See Querying your Calendar" for more information.

What does not display:

Events not listed as “published”. What does that mean? When an event is submitted the calendar’s owner will decide to whether or not the event is appropriate for their calendar. If they accept the event they can set the event’s publication status to “published” otherwise they might hold it as a draft, retire or delete the event from their calendar. Event Output is intended to support published calendar events coming in the future if you need a list of past published events you can specify a date range in your request (See Querying your Calendar.)

Querying Your Calendar

In order to obtain targeted output from your calendar, you will need to query the calendar.

To view dates in the past, future, or date ranges:

Type your calendar’s id URL and format in your browser’s address field.
Append one of the following queries to the end of the URL.

Query Result
/today All events for today.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/today
/YYYYMMDD All events for the specified date.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/20090909
/YYYYMMDD--YYYYMMDD All events for the specified date.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/20090909--20091109
/today--nday All events for from today through the next n days.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/today--90day
would give all the events from today’s date through the next 90 days.
/-nday--today All events from n days ago through today.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/-90day--today
would give all events from 90 days ago through today.
/-nday--nday All events from n days ago through the next n days.
Example: http://web-app.usc.edu/ws/eo2/calendar/32/list/-1day--1day
would give all events from yesterday through tomorrow.

To view an alphabetized list of all categories as XML or JSON used:

Type your calendar’s id URL and format in your browser’s address field.
Append /categories to the end of the URL.

Example: http://web-app.usc.edu/ws/eo2/xml/32/list/categories

Example: http://web-app.usc.edu/ws/eo2/json/32/list/categories

Example: JSONP with callback named categoryList – http://web-app.usc.edu/ws/eo2/json/32/categories?jsonp_callback=cagetoryList

To view a list of all events in a category chronological order:

Type your calendar’s id URL and format in your browser’s address field.
Append /category/[category name] to the end of the URL.

Example: http://web-app.usc.edu/ws/eo2/xml/32/list/category/Film

This will return all events in the specified calendar in the Film category.

If you want to limit the number of events returned, for example, if you only want the first, second, and third events in a specified category returned, append the query with /limit/[range] where [range] defines the range of items.

Example: http://web-app.usc.edu/ws/eo2/xml/32/list/category/Film/limit/1-3

This will return the first three events (records 0-2) in the specified calendar in the Film category.

JSON and JSONP formats are also supported.

Example: http://web-app.usc.edu/ws/eo2/json/32/list/category/Film/limit/1-3

Example: http://web-app.usc.edu/ws/eo2/json/32/list/category/Film/limit/1-3?jsonp_callback=filmList

To view details on an event:

Type your calendar’s id URL and format in your browser’s address field. Append /event/[id] to the end of the URL.

Example: http://web-app.usc.edu/ws/eo2/xml/32/list/event/865075

This will return all details for the event with the id 865075.

To view results for a search query:

Type your calendar’s id URL and format in your browser’s address field. Append /list/search/[query] to the end of the URL. Note: The query string must be url encoded.

Example: http://web-app.usc.edu/ws/eo2/xml/32/list/search/music

This will return all events containing the word music in the event details.
Can you use the [range] variable to limit all of these queries.

Definitions

old documentation