Created
February 3, 2017 07:28
-
-
Save michelleroth/ac9f828417e6686c671d6c5e275bf5f4 to your computer and use it in GitHub Desktop.
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
//AIzaSyA-0Z_VcymgWbDhYOeZyQMnRtxm2ODAlTA | |
var url = "https://www.googleapis.com/youtube/v3/search?part=snippet&key=AIzaSyA-0Z_VcymgWbDhYOeZyQMnRtxm2ODAlTA&q=" | |
$.ajax({ | |
type: 'GET', | |
url: url, | |
dataType: 'json', | |
error: function (err) { | |
console.log (err); | |
}, | |
success: function (responseData) { | |
//console.log (responseData.items[4].snippet.thumbnails.default.url); | |
for (var i = 0; i <= responseData.items.length; i++){ | |
console.log(responseData.items[i].snippet.thumbnails.default.url) | |
} | |
} | |
}); |
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
<html lang="en"> | |
<head> | |
<title>YouTubeAPI</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<h1>Search YouTube</h1> | |
<form id="js-search-list-form"> == $0 | |
<label for="js-search-list-entry"></label> | |
</body> | |
<div class="container"> | |
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
h1 { | |
display: block; | |
background: white; | |
} |
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
h1 { | |
display: block; | |
background: white; | |
} | |
<html lang="en"> | |
<head> | |
<title>YouTubeAPI</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<h1>Search YouTube</h1> | |
<form id="js-search-list-form"> == $0 | |
<label for="js-search-list-entry"></label> | |
</body> | |
<div class="container"> | |
//AIzaSyA-0Z_VcymgWbDhYOeZyQMnRtxm2ODAlTA | |
var url = "https://www.googleapis.com/youtube/v3/search?part=snippet&key=AIzaSyA-0Z_VcymgWbDhYOeZyQMnRtxm2ODAlTA&q=" | |
$.ajax({ | |
type: 'GET', | |
url: url, | |
dataType: 'json', | |
error: function (err) { | |
console.log (err); | |
}, | |
success: function (responseData) { | |
//console.log (responseData.items[4].snippet.thumbnails.default.url); | |
for (var i = 0; i <= responseData.items.length; i++){ | |
console.log(responseData.items[i].snippet.thumbnails.default.url) | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment