de.umass.lastfm
Class BuyLink

java.lang.Object
  extended byde.umass.lastfm.BuyLink

public class BuyLink
extends Object

A BuyLink contains information about places to buy an Album or Track. BuyLinks can point to physical and digital music stores. Some suppliers have icons, some do have price information, others don't (eBay for example). Common suppliers you will receive via the getBuylinks() methods are Amazon, Amazon MP3, iTunes and 7digital. All stores but eBay do supply icons at the time of writing.

Author:
Janni Kovacs
See Also:
Album.getBuylinks(String, String, String, String), Track.getBuylinks(String, String, String, String)

Field Summary
static int StoreType_DIGITAL
           
static int StoreType_PHYSICAL
           
 
Method Summary
 String getCurrency()
          Returns the currency of the price of the item.
 String getIcon()
          Returns a url to a 16x16 pixel icon for the store, or null if no icon url was supplied.
 String getLink()
           
 String getName()
           
 double getPrice()
          Returns the price for the item, or 0.0 if no price information is available.
 int getType()
           
 boolean isSearch()
          Returns true if this link points to a search page instead of an actual product page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

StoreType_PHYSICAL

public static final int StoreType_PHYSICAL
See Also:
Constant Field Values

StoreType_DIGITAL

public static final int StoreType_DIGITAL
See Also:
Constant Field Values
Method Detail

getName

public String getName()

getLink

public String getLink()

getType

public int getType()

getIcon

public String getIcon()
Returns a url to a 16x16 pixel icon for the store, or null if no icon url was supplied.

Returns:
Icon URL or null

isSearch

public boolean isSearch()
Returns true if this link points to a search page instead of an actual product page. Note that for search links there is no price information available.

Returns:
if this is a search link

getCurrency

public String getCurrency()
Returns the currency of the price of the item. Check if this is null to double-check if there is price information available

Returns:
currency

getPrice

public double getPrice()
Returns the price for the item, or 0.0 if no price information is available. Use getCurrency() and isSearch() to check if price information is available.

Returns:
price, if available