Skip to content

Instantly share code, notes, and snippets.

@tommymcglynn
Last active December 25, 2015 01:09
Show Gist options
  • Save tommymcglynn/6892810 to your computer and use it in GitHub Desktop.
Save tommymcglynn/6892810 to your computer and use it in GitHub Desktop.
Sample javascript to load current TestFlight SDK versions and URLs.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
(function() {
var _apiHost = 'https://testflightapp.com';
$.ajax({
url: _apiHost+'/api/sdkinfo',
context: document.body,
dataType: 'jsonp'
}).done(function(data) {
$('body').append('<div><a href="'+data.Android.url+'">Android '+data.Android.version_name+' - '+data.Android.release_date+'</a></div>');
$('body').append('<div><a href="'+data.iOS.url+'">iOS '+data.iOS.version_name+' - '+data.iOS.release_date+'</a></div>');
});
})(jQuery)
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment