The code is very early, more of a quick proof of concept hack than a completed solution. That said it supports the Tour Search and Tour Show API methods, returns JSON / JSONP (supporting the default JQuery callback=? parameter for JSONP) and we also have a hosted version for use by those entering the THack event (available for the duration of the event).
THack attendees are welcome to use the above hosted version of this code, you do not need to download the PHP and install it on your own server unless you wish to use your own Marketplace Agent account and credentials. See Working examples above.
Generally the querystring parameters used should be as per the API Method you are calling (e.g. currently either Tour Search or Tour Show) however there are a few parameters specific to the JSON Repeater:
|return||Sets the content-type returned, only supported value is text (returns "text/plain"). Defaults to "application/json"|
|callback||By default the API will return a JSON object, passing the callback parameter causes a JSONP response, the value being used as the callback function. If you are using JQuery's JSONP implementation you don't need to worry about this param.|
|channel||The various TourCMS API methods pass the Channel ID (Identifier for a specific connected company/brand) in the request header, this is not possible with JSONP thus for the purposes of the JSON Repeater the channel can be provided in the querystring. This is used when showing a particular Tour (as Tour ID's are unique per channel, not system wide) and also when searching for Tours just from a specific channel. If searching all Tours/Hotels accross all connected channels then the channel ID can be left out (or passed as 0).|
The library is provided under an MIT license which allows you absolute flexibility in re-use and distribution, you may use the library in your own closed source or open source applications. If you would prefer to receive the library under another license please contact us.