Events.createEvent

Use this method to create an event and have the new event ID returned.


Syntax

int events.createEvent ( int vhost, string name, array additionalInfo = array() )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost ID that you want the event to be a member of.
namestringRequirednoneThe name you want the event to have.
additionalInfoarrayOptionalarray()Any and all additional information that you want stored with the event. This is an ARRAY.

additionalInfo

additionalInfo is an array that consists of the information that you want to have stored in your event.

NameTypeRequiredDefaultPossible ValuesDescription
emailstringno email@example.comThe email address that users can use to email media into the event.
descriptionstringno  stringA blurb of text that describes what the event is all about. The description is searchable.
logointno05000333A media ID for a piece of media that is to be used as the event logo. The default value is 0, which means that the event has no logo assigned to it.
urlstringno http://example.comThe url for the event.
createdByintno14155555The UID of the user who created the event.
notestringno stringSome text about the event. The note is not searchable.
geo_longitudefloatno0-52.44The longitude of the event. This would be specified by the creator of the event.
geo_latitudefloatno062.86The latitude of the event. This would be specified by the creator of the event.
moderationStatusstringnounmoderatedunmoderated, accepted, denied, deleted, notdenied, moderated, allThe moderation status once the event has been created in MediaFactory.
addressstringno stringThe address of the event. This would be the event location.
citystringno  TorontoA city that the event is associated with.
countrystringno  CA, USThe 2-letter country code for the event location.
statestringno ONThe 2-letter state / province code for the event.
postalcodestringno M1M1M1A valid postal code to contact the event.
otherarrayno {'key': 'value'}This is any additional information about the event that does not fit into the fields above.
custom1stringno stringA searchable string for additional content that you want stored about the event.
startDatetimestampno0000-00-00 00:00:002012-02-15 00:00:00The date and time that the event begins.
endDate timestampno0000-00-00 00:00:002012-03-25 14:10:11The date and time that the event ends.
parentGroupintno09499The ID of the parent event for the event to be created. The default value is 0, which means that the event has no parent; it is the top-level.

Response

fileData is an array that consists of the information that you want to have stored in your media.

NameTypeDescription
resultINTThe ID of the newly created event.

Sample Response

Sample REST Response
http://api.filemobile.com/services/rest/events/createEvent?vhost=[VHOST]&name=[NEW_GROUP_NAME]&additionalInfo[email]=[USER_EMAIL]&additionalInfo[other][key]=value&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>NEW_EVENT_ID</result>
Sample JSON Response
{
    "status": true,
    "result": NEW_EVENT_ID
}

Code examples

0 comments

Be the first to comment on createEvent.

Add a Comment

  • captcha