API Reference

Events.getEvent

Returns information about a specific event.


Syntax

array events.getEvent ( int eventId )

Arguments

NameTypeRequiredDefault valueDescription
eventIdintRequirednone

Response

The response items returned in a events.getEvents service call.

NameTypeDescriptionPossible Values
idINTThe ID of the event.INT
nameSTRINGThe name of the event.STRING
descriptionSTRINGA brif blurb about the event. History, purpose, location, ideas, awards, etc. The description is searchable.STRING
noteSTRINGSome text about the event. The note is not searchable.STRING
logoINTThe media ID that is used as the event logo.INT
publicUrlSTRINGThe url to access the event logo. The public url will log a hit against the media item when ever loaded. This would be best used on an event details page.STRING
thumbUrlSTRINGThe url to access the event logo. The thumb url will _NOT_ log a hit against the media item when loaded. This is best used in event galleries or plotting events on a map.STRING
urlSTRINGThe url of the event. This is used best if the event is for a company, an event with a unique url they wish to also direct traffic to.STRING
createdYYYY-MM-DD HH:MM:SSThe date the event was created.YYYY-MM-DD HH:mm:SS
createdByINTThe user ID of the user who created the event.INT
memberCountINTThe number of members in the event.INT
mediaCountINTThe number of media items in the event.INT
approvedMediaCountINTThe number of approved media items in the event.INT
notDeniedMediaCountINTThe number of not denied media items in the event.INT
geo_longitudeLNGThe longitude of the event. This would be specified by the creator of the event.NUMBER (-52.44)
geo_latitudeLATThe latitude of the event. This would be specified by the creator of the event.NUMBER (62.86)
moderationStatusSTRINGThe moderation status of the event which has just been created. By default if this is not passed the events moderationstatus will be unmoderated.accepted, denied, unmoderated, moderated, notdenied, all
parentEventINTThe ID of the parent event if the current event is a child.INT
addressSTRINGThe address of the event.STRING
citySTRINGThe city that the event is located in.INT
countrySTRINGThe country that the event is located in. This will be a 2-letter country code.STRING
stateSTRINGThis will be the state/province that the event is located in. It will be a 2-letter state/province code.STRING
postalcodeSTRINGA valid postal code to contact the event by.STRING
newMediaEmailTemplateIDINTThis is the ID of the email template that is sent out when a user uploads media into the event.INT
hostSTRINGThe name of the host who created the event or who is in charge of the event.STRING
groupTypeINTThis specifies if the group is a group or an event. 1 represents a group and 2 represents an event.1/2
vhostINTThe vhost ID that the event belongs to.INT
otherARRAYAn associated array that is used to store any additional information about the event that does not fit in any previous fields. This field is _NOT_ searchable or filterable. This is equivalent to the metadata field for media.ARRAY
custom1STRINGA searchable and filterable field for any additional information that does not fit into any previous field.STRING
treeleftINTUsed internally for the sorting and ordering events.INT
treerightINTUsed internally for the sorting and ordering events.INT
emailSTRINGThe email address to use to allow users to email content to this email address and have it uploaded and entered into the event.STRING
totalCountINTIf the includeTotalCount argument is set to true the total count of events returned will be included in the response.INT
startDateYYYY-MM-DD HH:MM:SSThe start date of the event.YYYY-MM-DD HH:MM:SS
endDateYYYY-MM-DD HH:MM:SSThe end date of the event.YYYY-MM-DD HH:MM:SS

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/events/getEvent?eventId=[EVENT_ID]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <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>USER_ID</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_ID</vhost>
  <other>
    <key>value</key>
  </other>  
  <custom1/>
  <treeleft>65</treeleft>
  <treeright>66</treeright>
  <email>CREATED_BY_USER_EMAIL</email>
  <startDate/>
  <endDate/>
</result>
Sample JSON Response
{
    "status": true,
    "result": {
        "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",
        "other": {
            "key": "value"
        },
        "custom1": "",
        "treeleft": "65",
        "treeright": "66",
        "email": "CREATED_BY_USER_EMAIL",
        "startDate": null,
        "endDate": null
    }
}

Code examples

0 comments

Be the first to comment on getEvent.

Add a Comment

  • captcha