Skip to content
haschek edited this page Feb 24, 2012 · 3 revisions

Last.fm service class

The Last.fm service allows to create boxes with your recently listened tracks, and your weekly and allover top album lists received from Last.fm.

Configuration values

  • title: the box title.
  • description: the box description.
  • total: the number of items to display
  • username: your Last.fm username, like in http://www.last.fm/user/username
  • key: the Last.fm API key
  • method: Either LastFMRecentTracks, LastFMLovedTracks, LastFMWeeklyTracks, LastFMWeeklyAlbums, LastFMTopAlbums

There are additional config parameters for LastFMRecentTracks, LastFMLovedTracks and LastFMWeeklyTracks.

for LastFMWeeklyAlbums

  • size: the size of each album covers

for LastFMTopAlbums

  • size: pixel size for the image width and height of the album cover picture
  • period: the time period over which to retrieve top albums for, either overall, 7day, 3month, 6month, 12month

Template keys

for LastFMRecentTracks, LastFMLovedTracks and LastFMWeeklyTracks

  • link: link of last.fm page of the track
  • artist: name of the artist
  • track: name of the track
  • date: date of last play / like

for LastFMWeeklyAlbums and LastFMTopAlbums

  • size: configured pixel size for the image width and height of the album cover picture
  • link: link of last.fm page of the album
  • album: name of the album
  • artist: name of the artist
  • image_small: image url of the album covers small version
  • image_medium: image url of the album covers medium version
  • image_large: image url of the album covers large version
  • image_extralarge: image url of the album covers extra large version

for LastFMRecentTracks

  • album: name of the album what contains the played track

for LastFMWeeklyTracks, LastFMWeeklyAlbums and LastFMTopAlbums

  • playcount: number of plays