Class MusicExtras::AllMusic
In: lib/musicextras/musicsites/allmusic.rb
Parent: MusicSite

This is an implementation of MusicSite for www.allmusic.com

Methods

Constants

NAME = 'AllMusic'
URL = 'www.allmusic.com'
DESCRIPTION = 'Artist images, album covers, years active, biography and album reviews for many genres'
ACCESS_VIOLATION_MSG = "Through traffic and monitoring of our websites"
COMMON_REGEX = '<a href="\/cg\/amg.dll\?p=amg&sql=([^"]*)">([^<]*)<\/a>'

Public Class methods

Public Instance methods

Fetches artist biography info, returning nil if none is found

artist
an Artist object

Calls get_artist_page

AllMusic.com seems to check for an abnormal number of accesses from IPs. This method should be called after initial fetches to see if the user is in violation. If so, it will print the message to stdout and exit with error code 100

Fetches album cover from the site, returning the image as a binary string

album
an Album Object

Note: returns nil if something went wrong

Returns an array: [album, album_url] or nil if none were found

Fetches artist image from site, returning the image as a binary string

artist
an Artist object

Note: returns nil if somethign went wrong (including not being able to find the artist image)

Fetches album review, returning nil if none is found

album
an Album object

Fetches the track listing for a page

Fetches the years the artist was active for, returning nil if not found

artist
an Artist object

[Validate]