I'm using SkyScanner's flight search widget on my website. The JS code that they give you to embed in your website is:
<script src="http://api.skyscanner.net/api.ashx" type="text/javascript"></script>
<script type="text/javascript">
skyscanner.load('snippets', '2');
function main() {
var snippet = new skyscanner.snippets.SearchPanelControl();
snippet.setCurrency('EUR');
snippet.setUrlParam('associateid', 'AFF_NTW_00014_00001');
snippet.setUrlParam('pid', '6439791');
snippet.setUrlParam('aid', '10644591');
snippet.setClickUrl('http://www.jdoqocy.com/click-6439791-10644591?sid=&url=@@url@@');
snippet.setShape('leaderboard');
snippet.setDeparture('ie');
snippet.draw(document.getElementById('snippet_searchpanel'));
}
skyscanner.setOnLoadCallback(main);
</script>
By inspecting the prototype of SearchPanelControl
I discovered lots of other functions that could be useful e.g. for setting the initial flight dates. However, I can't find any documentation for this API that explains what parameters each function expects.
I tried looking for the definition of skyscanner.snippets.SearchPanelControl
in the file http://api.skyscanner.net/api.ashx
, but it doesn't seem to be there. Does anyone know where this is documented, or alternatively, where I can find the source code thereof?