特定の URL からデータを取得していますが、正しい結果を取得するには、パラメーターを削除する必要があります。
トークンの入力によって現在生成されている URL は次のとおりです。
http://developer.echonest.com/api/v4/artist/suggest?api_key=W8ZWNWH6N&name=radiohead&_=1320665341820
最後の部分を削除する必要があります:-
&_=1320665341820
トークン入力で次の形式の URL が生成されるようにするにはどうすればよいですか。
http://developer.echonest.com/api/v4/artist/suggest?api_key=W8ZWNWH6N&name=radiohead
「トークン入力」の現在の初期化コードは次のとおりです。
$("#similar_artists").tokenInput("http://developer.echonest.com/api/v4/artist/suggest?api_key=W8ZWEXAMPLEWH6N", {
hintText: "Please begin typing the name of a famous artist who has the kind of sound you are looking for. You may select as many as you wish.",
theme: "facebook",
onAdd: function (item) {
filterDatatable();
},
onDelete: function (item) {
filterDatatable();
},
searchDelay: "0",
tokenDelimiter: ", ",
animateDropdown: true,
preventDuplicates: true,
deleteText: "",
tokenValue: "name",
crossDomain: false,
tokenLimit: "6",
queryParam: "name",
noResultsText: "There are no valid artists that match your request, please try again.",
onResult: function (data) {
return data['response']['artists'];
}
});
});