This repository was archived by the owner on Jan 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
getInfo
jamesfleeting edited this page Jun 8, 2011
·
1 revision
*id
- username
- name
- image.small
- image.medium
- image.large
- image.extralarge
- link
- country
- age
- gender
- subscriber
- playcount
- playlists
- registered.time
- registered.unixtime
$.simpleLastFM({
apikey: 'XXXXXXXXXXXXXXXX', //Get it at http://www.last.fm/api/account
username: 'YOURUSERNAME',
method: 'getInfo',
success: function(results) {
html = '<h2>User</h2>';
$(results).each(function() {
html += '<strong>Name</strong>: '+this.name+' (id: '+this.id+')<br />';
html += '<strong>Username</strong>: '+this.username+'<br />';
html += '<strong>Country</strong>: '+this.country+'<br />';
html += '<strong>Age</strong>: '+this.age+'<br />';
html += '<strong>Gender</strong>: '+this.gender+'<br />';
html += '<strong>Subscriber</strong>: '+this.subscriber+'<br />';
html += '<strong>Playcount</strong>: '+this.playcount+'<br />';
html += '<strong>Playlists</strong>: '+this.playlists+'<br />';
html += '<strong>Registered</strong>: '+this.registered.time+' (unix: '+this.registered.unixtime+')<br />';
html += '<strong>Link</strong>: <a href="'+this.link+'">'+this.link+'</a><br />';
html += '<strong>Images</strong>:<br />';
html += '<img src="'+this.image.extralarge+'"> <img src="'+this.image.large+'"> <img src="'+this.image.medium+'"> <img src="'+this.image.small+'"></p>';
});
$("#user").html(html);
},
error: function(error) {
$("#user").html('<p>'+error+'</p>');
}
});