Last active
August 29, 2015 14:06
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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