我不想通过从Grooveshark中获取的 tinysong API 获取歌曲列表,我正在通过它进行操作$.ajax
,到目前为止我得到了这个:
$.ajax({
url : 'http://tinysong.com/s/Beethoven?format=json&key='+key,
type : 'get',
dataType : 'jsonp',
succes : function(response){
console.log(response);
$('.content').append(response);
},
error: function(error){
console.warn('ERROR');
console.warn(error);
}
});
key
他们分配给我的 API 密钥在哪里。我收到以下错误:
资源解释为脚本,但使用 MIME 类型 text/html 传输:“http://tinysong.com/s/Beethoven?format=json&key=HERE_IS_MY_KEY&callback=jQuery172021696692402474582_1344209008518&_=1344209008523”。
但是,如果我转到该网址,我确实会打印出如下结果:
[{"Url":"http://tinysong.com/Aoxo","SongID":25802452,"SongName":"A 大调第七交响曲 Op. 92: Allegretto","ArtistID":1833, "ArtistName":"Beethoven","AlbumID":4497124,"AlbumName":"Beethoven: 9 Symphonien, Ouvert\u00fcren (1 of 6), Berstein, Leonard"},{"Url":"http://tinysong .com/jh4X","SongID":2909282,"SongName":"降E大调第五钢琴协奏曲 op. 73 'Emperor'","ArtistID":1833,"ArtistName":"Beethoven","AlbumID ":268605,"AlbumName":"The Best of Beethoven"},{"Url":"http://tinysong.com/JhLy","SongID":31825464,"SongName":"Beethoven: Piano Sonata #23 F小调,作品57,\"Appassionata\"","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":4913792,"AlbumName":"Beethoven's Greatest Hits"},{"Url":"http://tinysong.com/ 6Jk1","SongID":4925300,"SongName":"Beethoven #4: Adagio","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":842118,"AlbumName":"Beethoven: Symphonies Nos . 7 & 4"},{"Url":"http://tinysong.com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833,"ArtistName" :"Beethoven","AlbumID":2087629,"AlbumName":"Beethoven and the Sea"}]"Beethoven","AlbumID":4913792,"AlbumName":"Beethoven's Greatest Hits"},{"Url":"http://tinysong.com/6Jk1","SongID":4925300,"SongName":"Beethoven #4: Adagio","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":842118,"AlbumName":"Beethoven: Symphonies Nos. 7 & 4"},{"Url":"http: //tinysong.com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":2087629,"AlbumName": 《贝多芬与海》}]"Beethoven","AlbumID":4913792,"AlbumName":"Beethoven's Greatest Hits"},{"Url":"http://tinysong.com/6Jk1","SongID":4925300,"SongName":"Beethoven #4: Adagio","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":842118,"AlbumName":"Beethoven: Symphonies Nos. 7 & 4"},{"Url":"http: //tinysong.com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":2087629,"AlbumName": 《贝多芬与海》}]com/6Jk1","SongID":4925300,"SongName":"Beethoven #4: Adagio","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":842118,"AlbumName":"Beethoven:第 7 和 4 号交响曲"},{"Url":"http://tinysong.com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833," ArtistName":"Beethoven","AlbumID":2087629,"AlbumName":"Beethoven and the Sea"}]com/6Jk1","SongID":4925300,"SongName":"Beethoven #4: Adagio","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":842118,"AlbumName":"Beethoven:第 7 和 4 号交响曲"},{"Url":"http://tinysong.com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833," ArtistName":"Beethoven","AlbumID":2087629,"AlbumName":"Beethoven and the Sea"}]com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":2087629,"AlbumName":"Beethoven and the海”}]com/gGW0","SongID":11896153,"SongName":"F\u00fcr Elise","ArtistID":1833,"ArtistName":"Beethoven","AlbumID":2087629,"AlbumName":"Beethoven and the海”}]
我怎样才能将这些信息传递给我的 javascript?