Skip to content

Instantly share code, notes, and snippets.

@MikeSilvis
Last active August 29, 2015 14:06
Show Gist options
  • Save MikeSilvis/7ef52b709d0e036f67eb to your computer and use it in GitHub Desktop.
Save MikeSilvis/7ef52b709d0e036f67eb to your computer and use it in GitHub Desktop.
Search the Apple Store for arbitrary data. Does not rely on jQuery, or any other libraries
window.AppStoreSearch = {
find: function(config) {
var script = document.createElement('script');
AppStoreSearch.callBack = config.callBack;
script.src = '//itunes.apple.com/lookup?id=' + config.id + '&callback=AppStoreSearch.callBack'
document.getElementsByTagName('head')[0].appendChild(script);
}
};
AppStoreSearch.find({
id: 630189259,
callBack: function(data) {
console.log(data);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment