### Home Classes Methods

### In Files

- lib/last_fm/artist.rb

### Parent

LastFM::Request

### Methods

- ::getImages
- ::getInfo
- ::getSimilar
- ::getTopAlbums
- ::getTopTags
- ::getTopTracks
- ::search

### Files

- README_FOR_APP

### Class Index

Quicksearch

- LastFM
- LastFM::Album
- LastFM::Artist
- LastFM::Chart
- LastFM::Request
- LastFM::Track
- LastFM::Validator
- DeviseAuth
- DeviseAuth::RegistrationsController
- DeviseAuth::SessionsController
- Users
- Users::OmniauthCallbacksController
- ApplicationController
- ApplicationHelper
- Artist
- ArtistsController
- ChartsController
- HomeController
- Playlist
- PlaylistsTracks
- RedisQueryable
- SearchController
- Track
- TracksController
- User
- UsersController
- UsersHelper
- YoutubeVideoRating

No matching classes.

# LastFM::Artist

### Public Class Methods

getImages(artist, limit = nil) click to toggle source

        # File lib/last_fm/artist.rb, line 63
    63:     def self.getImages artist, limit = nil

    64:       artist_request "getImages", "images", artist, limit do |images|

    65:         images = LastFM::Validator.validate_mash images, "image"

    66:         images = Hashie::Mash.new({ :image => [] }) if images.total == "0"

    67:         update_results [current_class_name, __method__], images

    68:       end

    69:     end

getInfo(artist) click to toggle source

return: artist name, tags, similar artists, artist bio (summary / long), mbid, image urls ( different sizes )

        # File lib/last_fm/artist.rb, line 14
    14:     def self.getInfo artist

    15:       RedisQueryable.look_up_key(:artist, { :hashable => artist, :type => :info }) do

    16:         artist_request "getInfo", "artist", artist do |info|

    17:           info = LastFM::Validator.validate_mash info, "tag", "image"

    18:           update_results [current_class_name, __method__], info

    19:           RedisQueryable.store :artist, { :hashable => artist, :type => :info }, info.to_json

    20:         end

    21:       end

    22:     end

getSimilar(artist, limit = nil, page = nil) click to toggle source

return: artists ( name, mbid, image urls ( different sizes ) )

        # File lib/last_fm/artist.rb, line 25
    25:     def self.getSimilar artist, limit = nil, page = nil

    26:       RedisQueryable.look_up_key(:artist, { :hashable => artist, :type => :similar }) do

    27:         artist_request "getSimilar", "similarartists", artist, limit do |similar|

    28:           similar = LastFM::Validator.validate_mash similar, "tag", "image"

    29:           update_results [current_class_name, __method__], similar

    30:           RedisQueryable.store :artist, { :hashable => artist, :type => :similar }, similar.to_json

    31:         end

    32:       end

    33:     end

getTopAlbums(artist, limit = nil, page = nil) click to toggle source

return: albums ( name, mbid, album url, image urls ( different sizes ) ) ordered by popularity

        # File lib/last_fm/artist.rb, line 52
    52:     def self.getTopAlbums artist, limit = nil, page = nil

    53:       RedisQueryable.look_up_key(:artist, { :hashable => artist, :type => :albums, :page => page }) do

    54:         artist_request "getTopAlbums", "topalbums", artist, limit, page do |albums|

    55:           albums = LastFM::Validator.validate_mash albums, "album"

    56:           albums = Hashie::Mash.new({ :album => [] }) if albums.total == "0"

    57:           update_results [current_class_name, __method__], albums

    58:           RedisQueryable.store :artist, { :hashable => artist, :type => :albums, :page => page }, albums.to_json

    59:         end

    60:       end

    61:     end

getTopTags(artist) click to toggle source

return: tags ( name, tag´s last.fm-url ) ordered by popularity

        # File lib/last_fm/artist.rb, line 36
    36:     def self.getTopTags artist

    37:       artist_request "getTopTags", "toptags", artist

    38:     end

getTopTracks(artist, limit = nil, page = nil) click to toggle source

return: tracks ( name, image urls ( different sizes ) ) ordered by popularity

        # File lib/last_fm/artist.rb, line 41
    41:     def self.getTopTracks artist, limit = nil, page = nil

    42:       RedisQueryable.look_up_key(:artist, { :hashable => artist, :type => :tracks, :page => page }) do

    43:         artist_request "getTopTracks", "toptracks", artist, limit, page do |tracks|

    44:           tracks = LastFM::Validator.validate_mash tracks, "tag", "image"

    45:           update_results [current_class_name, __method__], tracks

    46:           RedisQueryable.store :artist, { :hashable => artist, :type => :tracks, :page => page }, tracks.to_json

    47:         end

    48:       end

    49:     end

search(query, limit = nil, page = nil) click to toggle source

        # File lib/last_fm/artist.rb, line 5
     5:     def self.search query, limit = nil, page = nil

     6:       artist_request "search", "artistmatches", query, limit, page do |result|

     7:         result = LastFM::Validator.validate_mash result

     8:         result = Hashie::Mash.new({ :artist => [] }) if result.blank?

     9:         update_results [current_class_name, __method__], result

    10:       end

    11:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.