_docs-v5/event-source/event-source-object.md
An "event source" is anything that provides FullCalendar with data about events.<!--more--> It can be a simple array, an event-generating function that you define, a URL to a json feed, or a Google Calendar feed.
Event Objects can have "options" associated with them. However, before you can start specifying options, you must write an Event Object in its extended form. It must be a traditional JavaScript object with properties. Here are the extended forms for each type of Event Source:
Array of events:
{
events: [
{
title: 'Event1',
start: '2011-04-04'
},
{
title: 'Event2',
start: '2011-05-05'
}
// etc...
],
color: 'yellow', // an option!
textColor: 'black' // an option!
}
Event-generating function:
{
events: function(info, successCallback, failureCallback) {
// ...
},
color: 'yellow', // an option!
textColor: 'black' // an option!
}
JSON feed:
{
url: '/myfeed.php',
color: 'yellow', // an option!
textColor: 'black' // an option!
}
Google Calendar feed:
{
googleCalendarId: '[email protected]',
color: 'yellow', // an option!
textColor: 'black' // an option!
}
For JSON feeds, there are additional options you can set.
The above object is what you specify to initially define an event source, but if you want to access it and manipulate it dynamically afterwards, you'll be dealing with a different type of object. This type of object is emitted from methods like getEventSources and getEventSourceById. It has the following properties and methods:
<table> <tr> <th>id</th> <td markdown='1'> The specified ID </td> </tr> <tr> <th>url</th> <td markdown='1'> If a [JSON feed](events-json-feed) or [iCalendar feed](icalendar), the specified URL </td> </tr> <tr> <th>format</th> <td markdown='1'> `'json'` for a [JSON feed](events-json-feed), `'ics'` for an [iCalendar feed](icalendar), or `null` for anything else. </td> </tr> <tr> <th>refetch()</th> <td markdown='1'> Refetches event data for this event source. [More information](EventSource-refetch). </td> </tr> <tr> <th>remove()</th> <td markdown='1'> Removes this source from the calendar [More information](EventSource-remove). </td> </tr> </table>