Class: Pandora::Song
- Inherits:
-
Object
- Object
- Pandora::Song
- Extended by:
- Forwardable
- Includes:
- Client
- Defined in:
- lib/pandora/song.rb
Constant Summary collapse
- ALL_AUDIO_FORMATS =
['HTTP_40_AAC_MONO', 'HTTP_64_AAC', 'HTTP_64_AACPLUS', 'HTTP_24_AACPLUS_ADTS', 'HTTP_32_AACPLUS_ADTS', 'HTTP_64_AACPLUS_ADTS', 'HTTP_128_MP3', 'HTTP_192_MP3', 'HTTP_32_WMA']
- DEFAULT_AUDIO_FORMATS =
['HTTP_32_AACPLUS_ADTS', 'HTTP_64_AACPLUS_ADTS', 'HTTP_192_MP3']
Instance Attribute Summary collapse
-
#album ⇒ Object
readonly
Returns the value of attribute album.
-
#album_art_url ⇒ Object
readonly
Returns the value of attribute album_art_url.
-
#album_explorer_url ⇒ Object
readonly
Returns the value of attribute album_explorer_url.
-
#album_url ⇒ Object
readonly
Returns the value of attribute album_url.
-
#allow_feedback ⇒ Object
readonly
Returns the value of attribute allow_feedback.
-
#amazon_album_asin ⇒ Object
readonly
Returns the value of attribute amazon_album_asin.
-
#amazon_album_digital_asin ⇒ Object
readonly
Returns the value of attribute amazon_album_digital_asin.
-
#amazon_album_url ⇒ Object
readonly
Returns the value of attribute amazon_album_url.
-
#amazon_song_digital_asin ⇒ Object
readonly
Returns the value of attribute amazon_song_digital_asin.
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#artist_explorer_url ⇒ Object
readonly
Returns the value of attribute artist_explorer_url.
-
#artist_url ⇒ Object
readonly
Returns the value of attribute artist_url.
-
#audio_url ⇒ Object
readonly
Returns the value of attribute audio_url.
-
#audio_urls ⇒ Object
readonly
Returns the value of attribute audio_urls.
-
#gain ⇒ Object
readonly
Returns the value of attribute gain.
-
#itunes_song_url ⇒ Object
readonly
Returns the value of attribute itunes_song_url.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#song_explorer_url ⇒ Object
readonly
Returns the value of attribute song_explorer_url.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(station, data, audio_formats) ⇒ Song
constructor
A new instance of Song.
Constructor Details
#initialize(station, data, audio_formats) ⇒ Song
Returns a new instance of Song.
26 27 28 29 |
# File 'lib/pandora/song.rb', line 26 def initialize(station, data, audio_formats) @station = station load_from_data(data, audio_formats) end |
Instance Attribute Details
#album ⇒ Object (readonly)
Returns the value of attribute album.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def album @album end |
#album_art_url ⇒ Object (readonly)
Returns the value of attribute album_art_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def album_art_url @album_art_url end |
#album_explorer_url ⇒ Object (readonly)
Returns the value of attribute album_explorer_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def album_explorer_url @album_explorer_url end |
#album_url ⇒ Object (readonly)
Returns the value of attribute album_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def album_url @album_url end |
#allow_feedback ⇒ Object (readonly)
Returns the value of attribute allow_feedback.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def allow_feedback @allow_feedback end |
#amazon_album_asin ⇒ Object (readonly)
Returns the value of attribute amazon_album_asin.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def amazon_album_asin @amazon_album_asin end |
#amazon_album_digital_asin ⇒ Object (readonly)
Returns the value of attribute amazon_album_digital_asin.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def amazon_album_digital_asin @amazon_album_digital_asin end |
#amazon_album_url ⇒ Object (readonly)
Returns the value of attribute amazon_album_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def amazon_album_url @amazon_album_url end |
#amazon_song_digital_asin ⇒ Object (readonly)
Returns the value of attribute amazon_song_digital_asin.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def amazon_song_digital_asin @amazon_song_digital_asin end |
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def artist @artist end |
#artist_explorer_url ⇒ Object (readonly)
Returns the value of attribute artist_explorer_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def artist_explorer_url @artist_explorer_url end |
#artist_url ⇒ Object (readonly)
Returns the value of attribute artist_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def artist_url @artist_url end |
#audio_url ⇒ Object (readonly)
Returns the value of attribute audio_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def audio_url @audio_url end |
#audio_urls ⇒ Object (readonly)
Returns the value of attribute audio_urls.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def audio_urls @audio_urls end |
#gain ⇒ Object (readonly)
Returns the value of attribute gain.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def gain @gain end |
#itunes_song_url ⇒ Object (readonly)
Returns the value of attribute itunes_song_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def itunes_song_url @itunes_song_url end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def @rating end |
#song_explorer_url ⇒ Object (readonly)
Returns the value of attribute song_explorer_url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def song_explorer_url @song_explorer_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def title @title end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def token @token end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
17 18 19 |
# File 'lib/pandora/song.rb', line 17 def url @url end |
Instance Method Details
#id ⇒ Object
31 32 33 34 |
# File 'lib/pandora/song.rb', line 31 def id load_explorer_data unless @id @id end |