Class: Shortwave::Facade::Radio

Inherits:
Remote
  • Object
show all
Defined in:
lib/shortwave/facade/lastfm.rb

Instance Attribute Summary

Attributes inherited from Remote

#session

Instance Method Summary collapse

Methods inherited from Remote

#initialize

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(options={})
  get(:session, {:method => "radio.getPlaylist"}.merge(options))
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, options={})
  post(:session, {:method => "radio.tune", :station => station}.merge(options))
end