Answer the question
In order to leave comments, you need to log in
How to get only time with Last FM API?
Hello, help me get the correct time from
https://ws.audioscrobbler.com/2.0/?method=user.get...
I take this:
<script>
// last.fm user get recent tracks
// docs: https://www.last.fm/api/show/user.getRecentTracks
$.getJSON("https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=tumarfm&api_key=0a1d291e241f00167608af030298c212&format=json", function (data) {
$.each(data["recenttracks"]["track"], function (key, value) {
var song = value["name"];
var artist = value["artist"]["#text"];
var date = value["date"]["#text"];
var html = "<li>";
html += "<a href=\"#\"></span>";
html += "<b>" + song + "</b>";
html += "<br/>" + artist + "</a>";
html += "</li>";
$("#results").append(html);
});
})
// Errors are your friend!.. Use them..
.error(function (jqXHR, textStatus, errorThrown) {
console.log("error " + textStatus);
console.log("error throw " + errorThrown);
console.log("incoming Text " + jqXHR.responseText);
}) // End of .error
.complete(function () {
console.log("complete");
});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question