Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

getTopTags

jamesfleeting edited this page Jun 8, 2011 · 1 revision

Tag Available Data

  • name
  • count
  • link

Example Usage

$.simpleLastFM({
	apikey: 'XXXXXXXXXXXXXXXX', //Get it at http://www.last.fm/api/account
	username: 'YOURUSERNAME',
	method: 'getTopTags',
	limit: 7, //Max is 200
	success: function(results) {
		html = '<h2>Top Tags</h2>';
		$(results).each(function() {
			html += '<strong>Tag</strong>: '+this.name+'<br />';
			html += '<strong>Count</strong>: '+this.count+'<br />';
			html += '<strong>Link</strong>: <a href="'+this.link+'">'+this.link+'</a><br />';
		});

		$("#topTags").html(html);
	},
	error: function(error) {
		$("#topTags").html('<p>'+error+'</p>');
	}
});
Clone this wiki locally