Package de.umass.lastfm
Class Radio
java.lang.Object
de.umass.lastfm.Radio
Provides access to the Last.fm radio streaming service.
Note that you have to be a subscriber (or have a special API key) to use this API. Official documentation can be found here http://www.last.fm/api/radio
Note that you have to be a subscriber (or have a special API key) to use this API. Official documentation can be found here http://www.last.fm/api/radio
- Author:
- Janni Kovacs
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionFetches a new radio playlist.getPlaylist
(boolean discovery, boolean rtp) Fetches a new radio playlist.getType()
int
Returns the playlist expiration value for the last playlist fetchet, or -1 if no playlist has been fetched yet.boolean
static Radio
tune
(Radio.RadioStation station, Session session) Tune in to a Last.fm radio station.static Radio
tune
(Radio.RadioStation station, Locale locale, Session session) Tune in to a Last.fm radio station.static Radio
Tune in to a Last.fm radio station.
-
Method Details
-
getType
-
getStationName
-
getStationUrl
-
supportsDiscovery
public boolean supportsDiscovery() -
playlistExpiresIn
public int playlistExpiresIn()Returns the playlist expiration value for the last playlist fetchet, or -1 if no playlist has been fetched yet.- Returns:
- playlist expiration in seconds
-
tune
Tune in to a Last.fm radio station.- Parameters:
station
- An instance ofRadio.RadioStation
session
- A Session instance- Returns:
- a Radio instance
-
tune
Tune in to a Last.fm radio station.- Parameters:
station
- An instance ofRadio.RadioStation
locale
- The language you want the radio's name insession
- A Session instance- Returns:
- a Radio instance
-
tune
Tune in to a Last.fm radio station.- Parameters:
station
- A lastfm radio URLlocale
- The language you want the radio's name insession
- A Session instance- Returns:
- a Radio instance
-
getPlaylist
Fetches a new radio playlist.- Returns:
- a new Playlist
-
getPlaylist
Fetches a new radio playlist.- Parameters:
discovery
- Whether to request last.fm content with discovery mode switched onrtp
- Whether the user is scrobbling or not during this radio session (helps content generation)- Returns:
- a new Playlist
-