Package de.umass.lastfm
Class BuyLink
- java.lang.Object
-
- de.umass.lastfm.BuyLink
-
public class BuyLink extends java.lang.Object
ABuyLink
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 thegetBuylinks()
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)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BuyLink.StoreType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCurrency()
Returns the currency of the price of the item.java.lang.String
getIcon()
Returns a url to a 16x16 pixel icon for the store, ornull
if no icon url was supplied.java.lang.String
getLink()
java.lang.String
getName()
double
getPrice()
Returns the price for the item, or 0.0 if no price information is available.BuyLink.StoreType
getType()
boolean
isSearch()
Returnstrue
if this link points to a search page instead of an actual product page.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getLink
public java.lang.String getLink()
-
getType
public BuyLink.StoreType getType()
-
getIcon
public java.lang.String getIcon()
Returns a url to a 16x16 pixel icon for the store, ornull
if no icon url was supplied.- Returns:
- Icon URL or
null
-
isSearch
public boolean isSearch()
Returnstrue
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 java.lang.String getCurrency()
Returns the currency of the price of the item. Check if this isnull
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. UsegetCurrency()
andisSearch()
to check if price information is available.- Returns:
- price, if available
-
-