|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.umass.lastfm.Radio
public class 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
Nested Class Summary | |
---|---|
static class |
Radio.RadioStation
|
Method Summary | |
---|---|
Playlist |
getPlaylist()
Fetches a new radio playlist or null if an error occured, such as when the user is not allowed to stream radio
(no subscriber). |
Playlist |
getPlaylist(boolean discovery,
boolean rtp)
Fetches a new radio playlist. |
String |
getStationName()
|
String |
getStationUrl()
|
String |
getType()
|
int |
playlistExpiresIn()
Returns the playlist expiration value for the last playlist fetchet, or -1 if no playlist has been fetched yet. |
boolean |
supportsDiscovery()
|
static Radio |
tune(Radio.RadioStation station,
Locale locale,
Session session)
Tune in to a Last.fm radio station. |
static Radio |
tune(Radio.RadioStation station,
Session session)
Tune in to a Last.fm radio station. |
static Radio |
tune(String station,
Locale locale,
Session session)
Tune in to a Last.fm radio station. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getType()
public String getStationName()
public String getStationUrl()
public boolean supportsDiscovery()
public int playlistExpiresIn()
public static Radio tune(Radio.RadioStation station, Session session)
station
- An instance of Radio.RadioStation
session
- A Session instance
public static Radio tune(Radio.RadioStation station, Locale locale, Session session)
station
- An instance of Radio.RadioStation
locale
- The language you want the radio's name insession
- A Session instance
public static Radio tune(String station, Locale locale, Session session)
station
- A lastfm radio URLlocale
- The language you want the radio's name insession
- A Session instance
public Playlist getPlaylist()
null
if an error occured, such as when the user is not allowed to stream radio
(no subscriber).
Playlist
or null
public Playlist getPlaylist(boolean discovery, boolean rtp)
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |