Skip to content

Instantly share code, notes, and snippets.

@JosephScript
JosephScript / giantBomb.js
Created November 16, 2015 19:58
A simple Giantbomb API request using JSONP for cross origin support.
$.ajax ({
type: 'GET',
dataType: 'jsonp',
crossDomain: true,
jsonp: 'json_callback',
url: 'http://www.giantbomb.com/api/search/?format=jsonp&api_key=[YOUR_API_KEY]&query=batman'
}).done(function(data) {
alert("success:", data);
}).fail(function() {
alert("error");