-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathecho-nest.html
More file actions
57 lines (40 loc) · 1.61 KB
/
echo-nest.html
File metadata and controls
57 lines (40 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<title>Echo Nest</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
var chimeMix = {
api_key: 'EF1NV6N2LUD248IMJ',
base_url: 'http://developer.echonest.com/api/v4/song/'
}
var getSongInfo = function(title, artist) {
var title = encodeURIComponent("Marry Me");
var artist = encodeURIComponent("The Drive-By Truckers");
var url = "http://developer.echonest.com/api/v4/song/search?api_key=EF1NV6N2LUD248IMJ&artist=" + artist + "&title=" + title;
$.ajax(url).done(function(data) {
console.debug('result: ', data);
var url = chimeMix.base_url +
"profile?api_key=" +
chimeMix.api_key +
"&id=" +
data.response.songs[0].id +
"&bucket=audio_summary";
$.ajax(url).done(function(data) {
console.debug('song profile: ', data);
});
});
}
$(document).on('ready', function() {
getSongInfo();
});
</script>
</head>
<body>
<h1>Echo Nest</h1>
<!--
Your API Key: EF1NV6N2LUD248IMJ
Your Consumer Key: 8cbd8baac7a0ce4c774100d872674f97
Your Shared Secret: tbvU1enMQAKD0sg+1hfQZA
-->
</body>
</html>