Class: Shortwave::Model::Playlist

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shortwave/model/playlist.rb

Overview

A playlist

Attributes

id

id

title

title

description

description

created_at

Creation time

size

Number of tracks in the playlist

duration

length in milliseconds of the playlist

creator_url

Last.fm url of creator

url

Last.fm url of playlist

Instance Method Summary collapse

Methods inherited from BaseModel

facade_name, identified_by, inherited, link_to, #session=, sharable, shoutable, taggable

Instance Method Details

#add_track(track) ⇒ Object

This can only be called on a user’s own playlist



31
32
33
# File 'lib/shortwave/model/playlist.rb', line 31

def add_track(track)
  @session.playlist_facade.add_track(id, track.name, track.artist_name)
end

#streamable?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/shortwave/model/playlist.rb', line 26

def streamable?
  @streamable
end