Class SoundcloudParsingHelper
java.lang.Object
org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringclientId()getAllImagesFromArtworkOrAvatarUrl(String originalArtworkOrAvatarUrl) getAllImagesFromTrackObject(com.grack.nanojson.JsonObject trackObject) getAllImagesFromVisualUrl(String originalVisualUrl) static StringgetAvatarUrl(com.grack.nanojson.JsonObject object) static StringgetInfoItemsFromApi(MultiInfoItemsCollector collector, String apiUrl) static StringgetStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl) static StringgetStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl, boolean charts) Fetch the streams from the given API and commit each of them to the collector.static StringgetStreamsFromApiMinItems(int minItems, StreamInfoItemsCollector collector, String apiUrl) Fetch the streams from the given API and commit each of them to the collector.static StringgetUploaderName(com.grack.nanojson.JsonObject object) static StringgetUploaderUrl(com.grack.nanojson.JsonObject object) static StringgetUsersFromApi(ChannelInfoItemsCollector collector, String apiUrl) Fetch the user items from the given API and commit each of them to the collector.static StringgetUsersFromApiMinItems(int minItems, ChannelInfoItemsCollector collector, String apiUrl) Fetch the users from the given API and commit each of them to the collector.static DateWrapperstatic com.grack.nanojson.JsonObjectresolveFor(Downloader downloader, String url) Call the endpoint "/resolve" of the API.static StringresolveIdWithWidgetApi(String urlString) Fetch the widget API with the url and return the id (like the id from the json API).static StringresolveUrlWithEmbedPlayer(String apiUrl) Fetch the embed player with the apiUrl and return the canonical url (like the permalink_url from the json API).
-
Field Details
-
SOUNDCLOUD_API_V2_URL
- See Also:
-
-
Method Details
-
clientId
- Throws:
ExtractionExceptionIOException
-
parseDate
- Throws:
ParsingException
-
resolveFor
public static com.grack.nanojson.JsonObject resolveFor(@Nonnull Downloader downloader, String url) throws IOException, ExtractionException Call the endpoint "/resolve" of the API.See docs
- Throws:
IOExceptionExtractionException
-
resolveUrlWithEmbedPlayer
public static String resolveUrlWithEmbedPlayer(String apiUrl) throws IOException, ReCaptchaException, HttpResponseException Fetch the embed player with the apiUrl and return the canonical url (like the permalink_url from the json API).- Returns:
- the url resolved
- Throws:
IOExceptionReCaptchaExceptionHttpResponseException
-
resolveIdWithWidgetApi
Fetch the widget API with the url and return the id (like the id from the json API).- Returns:
- the resolved id
- Throws:
IOExceptionParsingException
-
getUsersFromApiMinItems
public static String getUsersFromApiMinItems(int minItems, ChannelInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException, HttpResponseException Fetch the users from the given API and commit each of them to the collector.This differs from
getUsersFromApi(ChannelInfoItemsCollector, String)in the sense that they will always get MIN_ITEMS or more.- Parameters:
minItems- the method will return only when it has extracted this many items (equal or more)- Throws:
IOExceptionReCaptchaExceptionParsingExceptionHttpResponseException
-
getUsersFromApi
@Nonnull public static String getUsersFromApi(ChannelInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException, HttpResponseException Fetch the user items from the given API and commit each of them to the collector.- Returns:
- the next stream's url, empty if don't have
- Throws:
IOExceptionReCaptchaExceptionParsingExceptionHttpResponseException
-
getStreamsFromApiMinItems
public static String getStreamsFromApiMinItems(int minItems, StreamInfoItemsCollector collector, String apiUrl) throws IOException, ReCaptchaException, ParsingException, HttpResponseException Fetch the streams from the given API and commit each of them to the collector.This differs from
getStreamsFromApi(StreamInfoItemsCollector, String)in the sense that they will always get MIN_ITEMS or more items.- Parameters:
minItems- the method will return only when it has extracted this many items (equal or more)- Throws:
IOExceptionReCaptchaExceptionParsingExceptionHttpResponseException
-
getStreamsFromApi
@Nonnull public static String getStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl, boolean charts) throws IOException, ReCaptchaException, ParsingException, HttpResponseException Fetch the streams from the given API and commit each of them to the collector.- Returns:
- the next streams url, empty if don't have
- Throws:
IOExceptionReCaptchaExceptionParsingExceptionHttpResponseException
-
getStreamsFromApi
public static String getStreamsFromApi(StreamInfoItemsCollector collector, String apiUrl) throws ReCaptchaException, ParsingException, IOException, HttpResponseException -
getInfoItemsFromApi
public static String getInfoItemsFromApi(MultiInfoItemsCollector collector, String apiUrl) throws ReCaptchaException, ParsingException, IOException, HttpResponseException -
getUploaderUrl
-
getAvatarUrl
-
getUploaderName
-
getAllImagesFromTrackObject
@Nonnull public static List<Image> getAllImagesFromTrackObject(@Nonnull com.grack.nanojson.JsonObject trackObject) throws ParsingException - Throws:
ParsingException
-
getAllImagesFromArtworkOrAvatarUrl
-
getAllImagesFromVisualUrl
-