API Method /events/ical
This function handles event search and returns the results in an iCalendar (RFC-2445) format, not in XML.
Arguments
- authentication
- This method controls access via optional user authentication.
- keywords string
- The search keywords. (optional)
- location string
- A location name to use in filtering the search results. Locations in the form "San Diego", "San Diego, TX", "London, United Kingdom", and "Calgary, Alberta, Canada" are accepted, as are postal codes ("92122"). Full addresses ("1 Infinite Loop, Cupertino, CA") and common geocoordinate formats ("32.746682, -117.162741") are also accepted, but the "within" parameter is recommended in order to set a search radius. (optional)
- date string
- Limit this list of results to the specified date range. Date ranges are specified by label. Currently supported labels include: "All", "Future", "Past", "Today", "Last Week", "This Week", "Next week", and months by name, e.g. "October". (optional)
- within integer
- If within is set and the "location" parameter resolves to a specific geolocation, the search will be restricted to the specified radius. If the "location" parameter does not resolve to a specific location, this parameter is ignored. (optional)
- units string
- One of "mi" or "km", the units of the "within" parameter. Defaults to "mi".(optional)
- sort_order string
- One of 'popularity', 'date', 'title', 'relevance', or 'venue_name'. Default is 'date'.
(optional)
- sort_direction string
- One of 'ascending' or 'descending'. Default varies by sort_order.
(optional)
- page_size integer
- The desired number of results per page. Default: 50, Maximum: 50.(optional)
-
Example Request
Here's an example search URL:
http://api.eventful.com/rest/events/ical?...&keywords=concert&location=san+diego
Output Parameters
Output from this function is an VCALENDAR block with the following constructs:
- METHOD string
- Always "PUBLISH". Required by iCal format.
- CALSCALE string
- Always "GREGORIAN". Required by iCal format.
- PRODID string
- Required by iCal format.
- VERSION string
- Required by iCal format.
- X-WR-CALNAME string
- Summary of search query passed from input parameters.
- VEVENT array
- An array of VEVENT events. Each event entry has the following structure:
-
-
- DTSTART string
- The event start time, in ISO 8601 format (e.g. "20050301T190000").
- DTEND string
- The event end time, in ISO 8601 format (e.g. "20050301T190000").
-
- DTSTAMP string
- The last modified time, in ISO 8601 format (e.g. "20050301T190000").
-
- SUMMARY string
- The event title.
- DESCRIPTION string
- The event description.
- LOCATION string
- The venue name.
-
-
- SEQUENCE integer
- Always 0.
- UID string
- The unique ID for this event.
-
-
-
- URL string
- URL of associated event on Eventful site.
-
Example iCalendar Response (indented for clarity, actual response does not contain spaces.)
BEGIN:VCALENDAR
METHOD:PUBLISH
CALSCALE:GREGORIAN
PRODID:-//EVDB//www.eventful.com//EN
VERSION:2.0
X-WR-CALNAME:Eventful results for "concert" in "san diego"
BEGIN:VEVENT
DTSTART:20051111T190000
DTSTAMP:20050902T183453Z
SUMMARY:Rolling Stones
DESCRIPTION:
LOCATION:Petco Park (Stones)
SEQUENCE:0
UID:E0-001-000318135-0
URL:http://eventful.com/E0-001-000318135-0
END:VEVENT
...
END:VCALENDAR
Error Codes
This method may return these errors in an error document:
- Authentication error
- The specified user was not found or provided invalid credentials.