Welcome to the ridiculously short developer documentation for klubitus!
Klubitus is an almost vanilla version of Anqh 1.0, an open source PHP 5.3 project built on top of Kohana 3.2.2.
You can fetch public read-only data with our REST API using simple HTTP GET requests.
The response is formatted in JSON.
Parameters taking multiple values are separated with a colon :
API base URL:
http://api.klubitus.org/v1
Using jQuery to load JSONP data about event #1501:
$.ajax({ url: 'http://api.klubitus.org/v1/events/event', dataType: 'jsonp', data: { id: 1501 }, success: function(data, status, xhr) { console.log(data); } });
JSON result in console:
{ "version": "v1", "events": [ { "id":"1501", "name":"massive - the birthday bash", "homepage":"", "stamp_begin":"1023555600", "stamp_end":"1023602400", "venue":"kutsulla", "city":"järvenpää", "country":"", "dj":"bella & marski, damien & yamo, sakura & bobby s & kaiu, erno, hopee, nigel, quu, phaze, jay logic", "info":" ", "age":"0", "price":"-1.00", "created":"1014461180", "modified":"1023514641", "flyer":null, "flyer_thumb":null, "flyer_icon":null, "favorite_count":"0", "music":"kiksu, pesukonetechno, progepsyketechnohouse, polkka, chill..", "url":"http://alpha.klubitus.org/event/1501-massive-the-birthday-bash" } ] }
Parameter | Values | Description |
---|---|---|
field |
age city created dj favorite_count flyer flyer_icon flyer_id flyer_thumb id info modified music name price price2 stamp_begin stamp_end url url venue venue_id |
Fetchable fields. |
http://api.klubitus.org/v1/events/browse?{parameters}
Parameter | Values | Description |
---|---|---|
field |
See common parameters. | |
from |
today (default)unix timestamp textual datetime description parsed with strtotime, e.g. yesterday , next monday , last month
|
Initial date to start browsing. |
limit |
count, max 500 date span, e.g. 1m , 1w (default), 1d
|
How many events to load. |
order |
asc (default)desc
|
Browsing order, asc for upcoming events, desc for past events. |
http://api.klubitus.org/v1/events/event?{parameter}
Parameter | Values | Description |
---|---|---|
id |
numeric id | Load all data from given event, i.e. does not use field parameter. |
http://api.klubitus.org/v1/events/search?{parameters}
Parameter | Values | Description |
---|---|---|
field |
See common parameters. | |
filter |
upcoming past date:from-to |
Filter results by date. from and to are unix timestamps and you may leave either one empty to query for events up to or onwards. |
limit |
count, max 500 |
How many events to search. |
order |
field.order, e.g. name.asc , city.asc:name.asc |
Sort search results by this field, supports multiple fields with colon as separator |
q |
search term, minimum 3 characters | Term to search for. |
search |
city dj name venue |
Field(s) to search from. |
http://api.klubitus.org/v1/users/search?{parameters}
Parameter | Values | Description |
---|---|---|
field |
adds avatar city created description dob gender homepage id last_login latitude logins longitude modified picture posts signature title url username |
Fetchable fields. |
limit |
count, max 500 |
How many users to search. |
order |
field.order, e.g. gender.desc , gender.desc:username.asc |
Sort search results by this field, supports multiple fields with colon as separator |
q |
search term, minimum 2 characters | Term to search for. |
search |
city gender username |
Field(s) to search from. |
user |
user id | Prioritize friends if given. |
http://api.klubitus.org/v1/venues/search?{parameters}
Parameter | Values | Description |
---|---|---|
field |
address city created default_image description foursquare_category_id foursquare_id homepage hours id info latitude longitude modified name url zip |
Fetchable fields. |
limit |
count, max 500 |
How many venues to search. |
order |
field.order, e.g. name.asc , city.asc:name.asc |
Sort search results by this field, supports multiple fields with colon as separator |
q |
search term, minimum 3 characters | Term to search for. |
search |
city dj name venue |
Field(s) to search from. |