Created
April 21, 2016 21:10
-
-
Save anonymous/8996f72ea16298447266eb28554010cc to your computer and use it in GitHub Desktop.
Marvel API // source https://jsbin.com/migute
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Marvel API</title> | |
<script src="https://code.jquery.com/jquery-2.2.3.js" integrity="sha256-laXWtGydpwqJ8JA+X9x2miwmaiKhn8tVmOVEigRNtP4=" crossorigin="anonymous"></script> | |
<style id="jsbin-css"> | |
$red: #f0141e | |
$padding: 20px | |
body | |
background: #222 | |
h1 | |
text-align: center | |
font-size: 60px | |
color: $red | |
p | |
padding: $padding | |
a | |
color: $red | |
#results | |
margin: 50px auto | |
max-width: 960px | |
background: #eee | |
ul | |
margin: 0 auto | |
padding: 0 | |
display: block | |
li | |
display: inline-block | |
padding: $padding | |
max-width: 200px | |
vertical-align: top | |
</style> | |
</head> | |
<body> | |
<h1>Marvel API</h1> | |
<p>Just testing out the Marvel API pulling some comics. For more information on the API go to <a href="https://developer.marvel.com">developer.marvel.com</a></p> | |
<div id="heros"> | |
</div> | |
<script id="jsbin-javascript"> | |
// Public Key | |
// b781b896411dee7a54253ae8e6e34453 | |
$(function(){ | |
var marvelAPI = 'https://gateway.marvel.com/v1/public/comics'; | |
$.getJSON( marvelAPI, { | |
apikey: 'b781b896411dee7a54253ae8e6e34453' | |
}) | |
.done(function( response ) { | |
var heroObject = response.data.results; | |
console.log(heroObject); | |
$("#heros").append(JSON.stringify(heroObject[6].title)); | |
}); | |
}); | |
</script> | |
<script id="jsbin-source-css" type="text/css">$red: #f0141e | |
$padding: 20px | |
body | |
background: #222 | |
h1 | |
text-align: center | |
font-size: 60px | |
color: $red | |
p | |
padding: $padding | |
a | |
color: $red | |
#results | |
margin: 50px auto | |
max-width: 960px | |
background: #eee | |
ul | |
margin: 0 auto | |
padding: 0 | |
display: block | |
li | |
display: inline-block | |
padding: $padding | |
max-width: 200px | |
vertical-align: top | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// Public Key | |
// b781b896411dee7a54253ae8e6e34453 | |
$(function(){ | |
var marvelAPI = 'https://gateway.marvel.com/v1/public/comics'; | |
$.getJSON( marvelAPI, { | |
apikey: 'b781b896411dee7a54253ae8e6e34453' | |
}) | |
.done(function( response ) { | |
var heroObject = response.data.results; | |
console.log(heroObject); | |
$("#heros").append(JSON.stringify(heroObject[6].title)); | |
}); | |
});</script></body> | |
</html> |
This file contains hidden or 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
$red: #f0141e | |
$padding: 20px | |
body | |
background: #222 | |
h1 | |
text-align: center | |
font-size: 60px | |
color: $red | |
p | |
padding: $padding | |
a | |
color: $red | |
#results | |
margin: 50px auto | |
max-width: 960px | |
background: #eee | |
ul | |
margin: 0 auto | |
padding: 0 | |
display: block | |
li | |
display: inline-block | |
padding: $padding | |
max-width: 200px | |
vertical-align: top |
This file contains hidden or 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
// Public Key | |
// b781b896411dee7a54253ae8e6e34453 | |
$(function(){ | |
var marvelAPI = 'https://gateway.marvel.com/v1/public/comics'; | |
$.getJSON( marvelAPI, { | |
apikey: 'b781b896411dee7a54253ae8e6e34453' | |
}) | |
.done(function( response ) { | |
var heroObject = response.data.results; | |
console.log(heroObject); | |
$("#heros").append(JSON.stringify(heroObject[6].title)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment