net.sourceforge.atunes.kernel.modules.contextInformation.lastfm
Class LastFmService

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.contextInformation.lastfm.LastFmService

public class LastFmService
extends java.lang.Object

The Class LastFmService. This class is responsible of retrieve information from Last.fm web services.


Constructor Summary
LastFmService(Proxy proxy, java.lang.String user, java.lang.String password)
          Instantiates a new Last.fm service
 
Method Summary
 AlbumInfo getAlbum(java.lang.String artist, java.lang.String album)
          Gets the album.
 AlbumListInfo getAlbumList(java.lang.String artist)
          Gets the album list.
 java.lang.String getArtistTopTag(java.lang.String artist)
          Gets the artist top tag.
 java.awt.Image getImage(AlbumInfo album, AudioFile file)
          Gets the image.
 java.awt.Image getImage(ArtistInfo artist)
          Gets the image.
 java.awt.Image getImage(SimilarArtistsInfo similar)
          Gets the image.
 SimilarArtistsInfo getSimilarArtists(java.lang.String artist)
          Gets the similar artists.
 java.lang.String getWikiText(java.lang.String artist)
          Gets the wiki text.
 java.lang.String getWikiURL(java.lang.String artist)
          Gets the wiki url.
 void submit(AudioFile file, long secondsPlayed)
          Submits song to Last.fm
 void submitNowPlayingInfo(AudioFile file)
          Submits now playing info to Last.fm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LastFmService

public LastFmService(Proxy proxy,
                     java.lang.String user,
                     java.lang.String password)
Instantiates a new Last.fm service

Parameters:
proxy - the proxy
user - the Last.fm username
password - the Last.fm password
Method Detail

getAlbum

public AlbumInfo getAlbum(java.lang.String artist,
                          java.lang.String album)
Gets the album.

Parameters:
artist - the artist
album - the album
Returns:
the album

getAlbumList

public AlbumListInfo getAlbumList(java.lang.String artist)
Gets the album list.

Parameters:
artist - the artist
Returns:
the album list

getArtistTopTag

public java.lang.String getArtistTopTag(java.lang.String artist)
Gets the artist top tag.

Parameters:
artist - the artist
Returns:
the artist top tag

getImage

public java.awt.Image getImage(AlbumInfo album,
                               AudioFile file)
Gets the image.

Parameters:
album - the album
Returns:
the image

getImage

public java.awt.Image getImage(ArtistInfo artist)
Gets the image.

Parameters:
artist - the artist
Returns:
the image

getImage

public java.awt.Image getImage(SimilarArtistsInfo similar)
Gets the image.

Parameters:
similar - the similar
Returns:
the image

getSimilarArtists

public SimilarArtistsInfo getSimilarArtists(java.lang.String artist)
Gets the similar artists.

Parameters:
artist - the artist
Returns:
the similar artists

getWikiText

public java.lang.String getWikiText(java.lang.String artist)
Gets the wiki text.

Parameters:
artist - the artist
Returns:
the wiki text

getWikiURL

public java.lang.String getWikiURL(java.lang.String artist)
Gets the wiki url.

Parameters:
artist - the artist
Returns:
the wiki url

submit

public void submit(AudioFile file,
                   long secondsPlayed)
            throws ScrobblerException
Submits song to Last.fm

Parameters:
file - audio file
secondsPlayed - seconds the audio file has already played
Throws:
ScrobblerException

submitNowPlayingInfo

public void submitNowPlayingInfo(AudioFile file)
                          throws ScrobblerException
Submits now playing info to Last.fm

Parameters:
file - audio file
Throws:
ScrobblerException


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.