Class: Shortwave::Model::Tag

Inherits:
BaseModel show all
Defined in:
lib/shortwave/model/tag.rb

Overview

A Last.fm tag

Attributes

name

Tag text

count

Number of times this tag has been applied

url

URL on Last.fm site

Instance Method Summary collapse

Methods inherited from BaseModel

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

Instance Method Details

#albumsObject

Returns the most popular albums tagged with this tag.



27
28
29
# File 'lib/shortwave/model/tag.rb', line 27

def albums
  link :top_albums, :Album, name
end

#artistsObject

Returns the most popular artists tagged with this tag.



32
33
34
# File 'lib/shortwave/model/tag.rb', line 32

def artists
  link :top_artists, :Artist, name
end

#similarObject

Returns similar tags to this one.



22
23
24
# File 'lib/shortwave/model/tag.rb', line 22

def similar
  link :similar, :Tag, name
end

#streamable?Boolean

Can music be streamed from this tag?

Returns:

  • (Boolean)


17
18
19
# File 'lib/shortwave/model/tag.rb', line 17

def streamable?
  streamable
end

#to_sObject

Returns the tag text



42
43
44
# File 'lib/shortwave/model/tag.rb', line 42

def to_s
  name
end

#tracksObject

Returns the most popular tracks tagged with this tag.



37
38
39
# File 'lib/shortwave/model/tag.rb', line 37

def tracks
  link :top_tracks, :Track, name
end