Class: Shortwave::Facade::Radio
- Defined in:
- lib/shortwave/facade/lastfm.rb
Instance Attribute Summary
Attributes inherited from Remote
Instance Method Summary collapse
-
#playlist(options = {}) ⇒ Object
Fetch new radio content periodically in an XSPF format.
-
#tune(station, options = {}) ⇒ Object
Tune in to a Last.fm radio station.
Methods inherited from Remote
Constructor Details
This class inherits a constructor from Shortwave::Facade::Remote
Instance Method Details
#playlist(options = {}) ⇒ Object
Fetch new radio content periodically in an XSPF format.
Options
discovery
-
Whether to request last.fm content with discovery mode switched on.
rtp
-
Whether the user is scrobbling or not during this radio session (helps content generation)
570 571 572 |
# File 'lib/shortwave/facade/lastfm.rb', line 570 def playlist(={}) get(:session, {:method => "radio.getPlaylist"}.merge()) end |
#tune(station, options = {}) ⇒ Object
Tune in to a Last.fm radio station.
station
-
A lastfm radio URL
Options
lang
-
An ISO language code to determine the language to return the station name in, expressed as an ISO 639 alpha-2 code.
561 562 563 |
# File 'lib/shortwave/facade/lastfm.rb', line 561 def tune(station, ={}) post(:session, {:method => "radio.tune", :station => station}.merge()) end |