public final class BandcampExtractorHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASE_API_URL |
static String |
BASE_URL |
Modifier and Type | Method and Description |
---|---|
static com.grack.nanojson.JsonObject |
getArtistDetails(String id)
Fetch artist details from mobile endpoint.
|
static String |
getImageUrl(long id,
boolean album)
Generate image url from image ID.
|
static String |
getStreamUrlFromIds(long bandId,
long itemId,
String itemType)
Translate all these parameters together to the URL of the corresponding album or track
using the mobile API
|
static boolean |
isRadioUrl(String url)
Whether the URL points to a radio kiosk.
|
static boolean |
isSupportedDomain(String url) |
static DateWrapper |
parseDate(String textDate) |
public static final String BASE_URL
public static final String BASE_API_URL
public static String getStreamUrlFromIds(long bandId, long itemId, String itemType) throws ParsingException
ParsingException
public static com.grack.nanojson.JsonObject getArtistDetails(String id) throws ParsingException
ParsingException
public static String getImageUrl(long id, boolean album)
The appendix "_10" was chosen because it provides images sized 1200x1200. Other integer values are possible as well (e.g. 0 is a very large resolution, possibly the original).
id
- The image IDalbum
- True if this is the cover of an album or trackpublic static boolean isSupportedDomain(String url) throws ParsingException
true
if the given URL looks like it comes from a bandcamp custom domain
or if it comes from bandcamp.com
itselfParsingException
public static boolean isRadioUrl(String url)
url
- the URL to checkhttps://bandcamp.com/?show=SHOW_ID
public static DateWrapper parseDate(String textDate) throws ParsingException
ParsingException