Returns a list of events for a specific vhost.
Pagination may be controlled via the "startPage" and "pageSize" parameters
The optional "sort" argument is a string that can be used to specify one field to sort the returned events by.The sort parameter can also include a sort direction ("ASC" or "DESC").
All events returned will have a last resort sort applied based on the unique event ID to ensure a consistent ordering of events even when the specified sort field is not unique. Example: sort="membercount DESC" - This will return a list of events with the events with the most members first. If multiple events have the same number of members then the ones with identical member counts will be ordered by ID equivalent to sort="membercount DESC, id".
To arrange the events or events in the same order as they appear in the tree within MediaFactory you must sort by "treeleft ASC". The fields supported for sorting are: membercount, id, created ,mediacount ,approvedmediacount ,notdeniedmediacount ,name, treeleft.
The various date filters are all parsed via the equivalent of PHP's strtotime function: http://php.net/manual/en/function.strtotime.php. The preferred form is YYYY-MM-DD HH:mm:ss
array events.getEvents ( int vhost, int uid = NULL, string moderationStatus = 'accepted', array filters = array(), string sort = 'created DESC', int|bool startPage = false, int|bool pageSize = false, bool includeTotalCount = false, bool noLimit = false, bool childGroupCount = false )
| Type | Description | |||
|---|---|---|---|---|
| none | The vhost ID that the event belongs to. | |||
| NULL | Filter by and only return events that the given user ID is a member of. | |||
| 'accepted' | Filter by moderation status (accepted, denied, unmoderated, moderated, notdenied, all). | |||
| array() | ||||
| 'created DESC' | Sets the sort field. Use format: fieldname ASC/DESC (default: "created DESC"). | |||
| false | Starting page index for pagination (default: false, counts from 0). | |||
| false | Items returned per page, max 200 (default: false, default 100). | |||
| false | If true, include total matching event count in response. | |||
| false | If true, disable pagination (requires events.getEventsNoLimit permission). | |||
| false | If true, include child event count for parentGroupId. |
The optional "filters" parameter is an array that may contain filter options.
The response items returned in a events.getEvents service call.
<?xml version="1.0" encoding="UTF-8"?>
<result>
<item>
<id>EVENT_ID</id>
<name>EVENT_NAME</name>
<description/>
<note/>
<logo>0</logo>
<publicUrl/>
<thumbUrl/>
<url/>
<created>2012-02-13 11:15:44</created>
<createdBy>1</createdBy>
<memberCount>0</memberCount>
<mediaCount>0</mediaCount>
<approvedMediaCount>0</approvedMediaCount>
<notDeniedMediaCount>0</notDeniedMediaCount>
<geo_longitude>0</geo_longitude>
<geo_latitude>0</geo_latitude>
<moderationStatus>unmoderated</moderationStatus>
<parentGroup>0</parentGroup>
<address/>
<city/>
<country/>
<state/>
<postalcode/>
<newMediaEmailTemplateID>0</newMediaEmailTemplateID>
<host/>
<groupType>2</groupType>
<vhost>VHOST</vhost>
<other/>
<custom1/>
<treeleft>65</treeleft>
<treeright>66</treeright>
<email>EVENT_CREATORS_EMAIL</email>
<startDate/>
<endDate/>
</item>
<item>
<id>EVENT_ID</id>
<name>EVENT_NAME</name>
<description/>
<note/>
<logo>0</logo>
<publicUrl/>
<thumbUrl/>
<url/>
<created>2012-01-28 19:33:59</created>
<createdBy>1</createdBy>
<memberCount>0</memberCount>
<mediaCount>1</mediaCount>
<approvedMediaCount>0</approvedMediaCount>
<notDeniedMediaCount>0</notDeniedMediaCount>
<geo_longitude>0</geo_longitude>
<geo_latitude>0</geo_latitude>
<moderationStatus>accepted</moderationStatus>
<parentGroup>0</parentGroup>
<address/>
<city/>
<country/>
<state/>
<postalcode/>
<newMediaEmailTemplateID>0</newMediaEmailTemplateID>
<host/>
<groupType>2</groupType>
<vhost>VHOST_ID</vhost>
<other/>
<custom1/>
<treeleft>59</treeleft>
<treeright>60</treeright>
<email>EVENT_CREATORS_EMAIL</email>
<startDate/>
<endDate/>
</item>
<totalCount>2</totalCount>
</result>
{
"status": true,
"result": {
"0": {
"id": "EVENT_ID",
"name": "EVENT_NAME",
"description": "",
"note": "",
"logo": "0",
"publicUrl": "",
"thumbUrl": "",
"url": "",
"created": "2012-02-13 11:15:44",
"createdBy": "1",
"memberCount": "0",
"mediaCount": "0",
"approvedMediaCount": "0",
"notDeniedMediaCount": "0",
"geo_longitude": "0",
"geo_latitude": "0",
"moderationStatus": "unmoderated",
"parentGroup": "0",
"address": "",
"city": "",
"country": "",
"state": "",
"postalcode": "",
"newMediaEmailTemplateID": "0",
"host": "",
"groupType": "2",
"vhost": "VHOST_ID",
"other": [],
"custom1": "",
"treeleft": "65",
"treeright": "66",
"email": "EVENT_CREATORS_EMAIL",
"startDate": null,
"endDate": null
},
"1": {
"id": "EVENT_ID",
"name": "EVENT_NAME",
"description": "",
"note": "",
"logo": "0",
"publicUrl": "",
"thumbUrl": "",
"url": "",
"created": "2012-01-28 19:33:59",
"createdBy": "1",
"memberCount": "0",
"mediaCount": "1",
"approvedMediaCount": "0",
"notDeniedMediaCount": "0",
"geo_longitude": "0",
"geo_latitude": "0",
"moderationStatus": "accepted",
"parentGroup": "0",
"address": "",
"city": "",
"country": "",
"state": "",
"postalcode": "",
"newMediaEmailTemplateID": "0",
"host": "",
"groupType": "2",
"vhost": "VHOST_ID",
"other": [],
"custom1": "",
"treeleft": "59",
"treeright": "60",
"email": "EVENT_CREATORS_EMAIL",
"startDate": null,
"endDate": null
},
"totalCount": "2"
}
}