forked from fasterthanlime/jsmad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (27 loc) · 800 Bytes
/
index.html
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
<html>
<body>
<script type="text/javascript" src="http:https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js"></script>
<script type="text/javascript">
$.ajax({
type: "GET",
url: "http:https://jsmad.org/musicbrainz/the streets",
dataType: "xml",
success: function(xml) {
var doc = $(xml);
console.log("name = " + doc.find('artist').children('name').text());
var artist_id = doc.find('artist').attr('id');
console.log("id = " + artist_id);
$.ajax({
type: "GET",
url: "http:https://jsmad.org/musicmetric/musicbrainz:" + artist_id,
dataType: "json",
success: function(json) {
console.log("success? " + json.success);
console.log("previous/current fans? " + json.response.fans.total.previous + "/" + json.response.fans.total.current);
}
});
}
});
</script>
</body>
</html>