public final class SoundcloudParsingHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SOUNDCLOUD_API_V2_URL |
Modifier and Type | Method and Description |
---|---|
static String |
clientId() |
static String |
getAvatarUrl(com.grack.nanojson.JsonObject object) |
static String |
getStreamsFromApi(StreamInfoItemsCollector collector,
String apiUrl) |
static String |
getStreamsFromApi(StreamInfoItemsCollector collector,
String apiUrl,
boolean charts)
Fetch the streams from the given API and commit each of them to the collector.
|
static String |
getStreamsFromApiMinItems(int minItems,
StreamInfoItemsCollector collector,
String apiUrl)
Fetch the streams from the given API and commit each of them to the collector.
|
static String |
getUploaderName(com.grack.nanojson.JsonObject object) |
static String |
getUploaderUrl(com.grack.nanojson.JsonObject object) |
static String |
getUsersFromApi(ChannelInfoItemsCollector collector,
String apiUrl)
Fetch the user items from the given API and commit each of them to the collector.
|
static String |
getUsersFromApiMinItems(int minItems,
ChannelInfoItemsCollector collector,
String apiUrl)
Fetch the users from the given API and commit each of them to the collector.
|
static OffsetDateTime |
parseDateFrom(String textualUploadDate) |
static com.grack.nanojson.JsonObject |
resolveFor(Downloader downloader,
String url)
Call the endpoint "/resolve" of the API.
|
static String |
resolveIdWithWidgetApi(String urlString)
Fetch the widget API with the url and return the id (like the id from the json API).
|
static String |
resolveUrlWithEmbedPlayer(String apiUrl)
Fetch the embed player with the apiUrl and return the canonical url (like the permalink_url
from the json API).
|
public static final String SOUNDCLOUD_API_V2_URL
public static String clientId() throws ExtractionException, IOException
ExtractionException
IOException
public static OffsetDateTime parseDateFrom(String textualUploadDate) throws ParsingException
ParsingException
public static com.grack.nanojson.JsonObject resolveFor(@Nonnull Downloader downloader, String url) throws IOException, ExtractionException
See https://developers.soundcloud.com/docs/api/reference#resolve
IOException
ExtractionException
public static String resolveUrlWithEmbedPlayer(String apiUrl) throws IOException, ReCaptchaException
IOException
ReCaptchaException
public static String resolveIdWithWidgetApi(String urlString) throws IOException, ParsingException
IOException
ParsingException
public static String getUsersFromApiMinItems(int minItems, ChannelInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException
This differ from getUsersFromApi(ChannelInfoItemsCollector, String)
in the sense
that they will always get MIN_ITEMS or more.
minItems
- the method will return only when it have extracted that many items
(equal or more)IOException
ReCaptchaException
ParsingException
public static String getUsersFromApi(ChannelInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException
IOException
ReCaptchaException
ParsingException
public static String getStreamsFromApiMinItems(int minItems, StreamInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException
This differ from getStreamsFromApi(StreamInfoItemsCollector, String)
in the sense
that they will always get MIN_ITEMS or more items.
minItems
- the method will return only when it have extracted that many items
(equal or more)IOException
ReCaptchaException
ParsingException
public static String getStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl, boolean charts) throws IOException, ReCaptchaException, ParsingException
IOException
ReCaptchaException
ParsingException
public static String getStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl) throws ReCaptchaException, ParsingException, IOException
public static String getUploaderName(com.grack.nanojson.JsonObject object)