Class: Shortwave::Facade::Album
- Defined in:
- lib/shortwave/facade/lastfm.rb
Instance Attribute Summary
Attributes inherited from Remote
Instance Method Summary collapse
-
#add_tags(artist, album, tags) ⇒ Object
Tag an album using a list of user supplied tags.
-
#info(options = {}) ⇒ Object
Get the metadata for an album on Last.fm using the album name or a musicbrainz id.
-
#remove_tag(artist, album, tag) ⇒ Object
Remove a user's tag from an album.
-
#search(album, options = {}) ⇒ Object
Search for an album by name.
-
#tags(artist, album) ⇒ Object
Get the tags applied by an individual user to an album on Last.fm.
Methods inherited from Remote
Constructor Details
This class inherits a constructor from Shortwave::Facade::Remote
Instance Method Details
#add_tags(artist, album, tags) ⇒ Object
Tag an album using a list of user supplied tags.
artistThe artist name in question
albumThe album name in question
tagsA comma delimited list of user supplied tags to apply to this album. Accepts a maximum of 10 tags.
433 434 435 |
# File 'lib/shortwave/facade/lastfm.rb', line 433 def (artist, album, ) post(:session, {:method => "album.addTags", :artist => artist, :album => album, :tags => }) end |
#info(options = {}) ⇒ Object
Get the metadata for an album on Last.fm using the album name or a musicbrainz id. See playlist.fetch on how to get the album playlist.
Options
artistThe artist name in question
albumThe album name in question
mbidThe musicbrainz id for the album
langThe language to return the biography in, expressed as an ISO 639 alpha-2 code.
444 445 446 |
# File 'lib/shortwave/facade/lastfm.rb', line 444 def info(={}) get(:standard, {:method => "album.getInfo"}.merge()) end |
#remove_tag(artist, album, tag) ⇒ Object
Remove a user's tag from an album.
artistThe artist name in question
albumThe album name in question
tagA single user tag to remove from this album.
424 425 426 |
# File 'lib/shortwave/facade/lastfm.rb', line 424 def remove_tag(artist, album, tag) post(:session, {:method => "album.removeTag", :artist => artist, :album => album, :tag => tag}) end |
#search(album, options = {}) ⇒ Object
Search for an album by name. Returns album matches sorted by relevance.
albumThe album name in question.
Options
limitLimit the number of albums returned at one time. Default (maximum) is 30.
pageScan into the results by specifying a page number. Defaults to first page.
463 464 465 |
# File 'lib/shortwave/facade/lastfm.rb', line 463 def search(album, ={}) get(:standard, {:method => "album.search", :album => album}.merge()) end |
#tags(artist, album) ⇒ Object
Get the tags applied by an individual user to an album on Last.fm.
artistThe artist name in question
albumThe album name in question
452 453 454 |
# File 'lib/shortwave/facade/lastfm.rb', line 452 def (artist, album) get(:session, {:method => "album.getTags", :artist => artist, :album => album}) end |