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.
artist
-
The artist name in question
album
-
The album name in question
tags
-
A 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
artist
-
The artist name in question
album
-
The album name in question
mbid
-
The musicbrainz id for the album
lang
-
The 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.
artist
-
The artist name in question
album
-
The album name in question
tag
-
A 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.
album
-
The album name in question.
Options
limit
-
Limit the number of albums returned at one time. Default (maximum) is 30.
page
-
Scan 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.
artist
-
The artist name in question
album
-
The 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 |