Happenr class

__construct

Default constructor

Parameters

login string
The login (username) that has to be used for authenticating
password string
The password that has to be used for authentication

Return

void

setTimeOut

Set the timeout
After this time the request will stop. You should handle any errors triggered by this.

Parameters

seconds int
The timeout in seconds

Return

void

setUserAgent

Set the user-agent for you application
It will be appended to ours, the result will look like: "PHP Happenr/<version> <your-user-agent>"

Parameters

userAgent string
Your user-agent, it should look like <app-name>/<app-version>

Return

void

getEvents

Get events

Parameters

language string (optional)
Language to be used for categories (both in querystring and in output).
channelId string (optional)
Defines the database that will be queried.
sorting string (optional)
Possible values are: alphabetical, date, distance, eventranking, random, images.
sourceId int (optional)
Integer value to query only one source.
firstRecord int (optional)
Integer value to indicate the first record.
limit int (optional)
Integer value to limit the number of results returned.
includeDatesXML bool (optional)
If true, detailed XML will be added for each day on which an event takes place.
includeEvents bool (optional)
If false, no events are returned in XML.
includeEventDetails bool (optional)
If true, more event fields are returned (e.g. event dates, event content etc.).
includeFilters bool (optional)
If true, all possible filters (with event count) are included in the XML.
includeDoubles bool (optional)
If false, event doubles are filtered out to only keep unique events.
includePermanentEvents bool (optional)
If false, permanent events are filtered out.
country string (optional)
Filter on one specific country.
region string (optional)
Filter on one specific region (typically a province or county).
town string (optional)
Filter on one specific town or municipality.
longitude string (optional)
If $longitude & $latitude are given, the events closest to the given coordinates will be returned. Use negative values for latitude South and longitude West.
latitude string (optional)
If $longitude & $latitude are given, the events closest to the given coordinates will be returned. Use negative values for latitude South and longitude West.
maxDistance int (optional)
Only events will be returned with maximum the given distance (in km) from the given longitude/latitude. Note: if a location is given (town, region and/or country) but no longitude/latitude is given, the location will be converted to a longitude/latitude first, and the search result will no longer be limited to the given location but will be limited to the given maximum distance from the location.
category string (optional)
Filter on one specific category (type of events).
date int (optional)
Filter on one specific day.
fromDate int (optional)
Filter on a period between a from-date and a to-date (both inclusive).
toDate int (optional)
Filter on a period between a from-date and a to-date (both inclusive).
period string (optional)
Filter on a period between a from-date and a to-date (both inclusive).
searchText string (optional)
Free text search on title and content.
venue string (optional)
Free text search on venue.

Return

array

getEventDetails

Get more details about an event

Parameters

eventId string
channelId string (optional)
Defines the database that will be queried.
includeDatesXML bool (optional)
If true, detailed XML will be added for each day on which the event takes place.

Return

array

About me?

Well, I'm Tijs Verkoyen, a self employed Belgian PHP-developer at Sumo Coders.

If you want to know more about me, check my blog (Dutch).

If you really like my work and want to support me, feel free to use the donate-button below.

Spoon

At both companies, we use Spoon. Spoon is a PHP5 Library that we use for building all our Web 2.0 applications.

The classes that you can download from this website are standalone, so each developer is free to use a library/framework/… he likes best.