Class ListLinkHandlerFactory
- java.lang.Object
-
- org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory
-
- org.schabi.newpipe.extractor.linkhandler.ListLinkHandlerFactory
-
- Direct Known Subclasses:
BandcampChannelLinkHandlerFactory
,BandcampChannelTabLinkHandlerFactory
,BandcampCommentsLinkHandlerFactory
,BandcampFeaturedLinkHandlerFactory
,BandcampPlaylistLinkHandlerFactory
,MediaCCCConferenceLinkHandlerFactory
,MediaCCCConferencesListLinkHandlerFactory
,MediaCCCLiveListLinkHandlerFactory
,MediaCCCRecentListLinkHandlerFactory
,PeertubeChannelLinkHandlerFactory
,PeertubeChannelTabLinkHandlerFactory
,PeertubeCommentsLinkHandlerFactory
,PeertubePlaylistLinkHandlerFactory
,PeertubeTrendingLinkHandlerFactory
,SearchQueryHandlerFactory
,SoundcloudChannelLinkHandlerFactory
,SoundcloudChannelTabLinkHandlerFactory
,SoundcloudChartsLinkHandlerFactory
,SoundcloudCommentsLinkHandlerFactory
,SoundcloudPlaylistLinkHandlerFactory
,YoutubeChannelLinkHandlerFactory
,YoutubeChannelTabLinkHandlerFactory
,YoutubeCommentsLinkHandlerFactory
,YoutubePlaylistLinkHandlerFactory
,YoutubeTrendingLinkHandlerFactory
public abstract class ListLinkHandlerFactory extends LinkHandlerFactory
-
-
Constructor Summary
Constructors Constructor Description ListLinkHandlerFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ListLinkHandler
fromId(java.lang.String id)
ListLinkHandler
fromId(java.lang.String id, java.lang.String baseUrl)
ListLinkHandler
fromQuery(java.lang.String id, java.util.List<java.lang.String> contentFilters, java.lang.String sortFilter)
ListLinkHandler
fromQuery(java.lang.String id, java.util.List<java.lang.String> contentFilters, java.lang.String sortFilter, java.lang.String baseUrl)
ListLinkHandler
fromUrl(java.lang.String url)
Builds aLinkHandler
from a url.
Be sure to callUtils.followGoogleRedirectIfNeeded(String)
on the url if overriding this function.ListLinkHandler
fromUrl(java.lang.String url, java.lang.String baseUrl)
Builds aLinkHandler
from an URL and a base URL.java.lang.String[]
getAvailableContentFilter()
Will returns content filter the corresponding extractor can handle like "channels", "videos", "music", etc.java.lang.String[]
getAvailableSortFilter()
Will returns sort filter the corresponding extractor can handle like "A-Z", "oldest first", "size", etc.java.lang.String
getUrl(java.lang.String id)
For making ListLinkHandlerFactory compatible with LinkHandlerFactory we need to override this, however it should not be overridden by the actual implementation.java.lang.String
getUrl(java.lang.String id, java.lang.String baseUrl)
abstract java.lang.String
getUrl(java.lang.String id, java.util.List<java.lang.String> contentFilter, java.lang.String sortFilter)
java.lang.String
getUrl(java.lang.String id, java.util.List<java.lang.String> contentFilter, java.lang.String sortFilter, java.lang.String baseUrl)
-
Methods inherited from class org.schabi.newpipe.extractor.linkhandler.LinkHandlerFactory
acceptUrl, getId, onAcceptUrl
-
-
-
-
Method Detail
-
getUrl
public abstract java.lang.String getUrl(java.lang.String id, java.util.List<java.lang.String> contentFilter, java.lang.String sortFilter) throws ParsingException, java.lang.UnsupportedOperationException
- Throws:
ParsingException
java.lang.UnsupportedOperationException
-
getUrl
public java.lang.String getUrl(java.lang.String id, java.util.List<java.lang.String> contentFilter, java.lang.String sortFilter, java.lang.String baseUrl) throws ParsingException, java.lang.UnsupportedOperationException
- Throws:
ParsingException
java.lang.UnsupportedOperationException
-
fromUrl
public ListLinkHandler fromUrl(java.lang.String url) throws ParsingException
Description copied from class:LinkHandlerFactory
Builds aLinkHandler
from a url.
Be sure to callUtils.followGoogleRedirectIfNeeded(String)
on the url if overriding this function.- Overrides:
fromUrl
in classLinkHandlerFactory
- Parameters:
url
- the url to extract path and id from- Returns:
- a
LinkHandler
complete with information - Throws:
ParsingException
-
fromUrl
public ListLinkHandler fromUrl(java.lang.String url, java.lang.String baseUrl) throws ParsingException
Description copied from class:LinkHandlerFactory
Builds aLinkHandler
from an URL and a base URL. The URL is expected to be already polished from Google search redirects (otherwise how couldbaseUrl
have been extracted?).
So do not callUtils.followGoogleRedirectIfNeeded(String)
on the URL if overriding this function, since that should be done inLinkHandlerFactory.fromUrl(String)
.- Overrides:
fromUrl
in classLinkHandlerFactory
- Parameters:
url
- the URL without Google search redirects to extract id frombaseUrl
- the base URL- Returns:
- a
LinkHandler
complete with information - Throws:
ParsingException
-
fromId
public ListLinkHandler fromId(java.lang.String id) throws ParsingException
- Overrides:
fromId
in classLinkHandlerFactory
- Throws:
ParsingException
-
fromId
public ListLinkHandler fromId(java.lang.String id, java.lang.String baseUrl) throws ParsingException
- Overrides:
fromId
in classLinkHandlerFactory
- Throws:
ParsingException
-
fromQuery
public ListLinkHandler fromQuery(java.lang.String id, java.util.List<java.lang.String> contentFilters, java.lang.String sortFilter) throws ParsingException
- Throws:
ParsingException
-
fromQuery
public ListLinkHandler fromQuery(java.lang.String id, java.util.List<java.lang.String> contentFilters, java.lang.String sortFilter, java.lang.String baseUrl) throws ParsingException
- Throws:
ParsingException
-
getUrl
public java.lang.String getUrl(java.lang.String id) throws ParsingException, java.lang.UnsupportedOperationException
For making ListLinkHandlerFactory compatible with LinkHandlerFactory we need to override this, however it should not be overridden by the actual implementation.- Specified by:
getUrl
in classLinkHandlerFactory
- Returns:
- the url corresponding to id without any filters applied
- Throws:
ParsingException
java.lang.UnsupportedOperationException
-
getUrl
public java.lang.String getUrl(java.lang.String id, java.lang.String baseUrl) throws ParsingException
- Overrides:
getUrl
in classLinkHandlerFactory
- Throws:
ParsingException
-
getAvailableContentFilter
public java.lang.String[] getAvailableContentFilter()
Will returns content filter the corresponding extractor can handle like "channels", "videos", "music", etc.- Returns:
- filter that can be applied when building a query for getting a list
-
getAvailableSortFilter
public java.lang.String[] getAvailableSortFilter()
Will returns sort filter the corresponding extractor can handle like "A-Z", "oldest first", "size", etc.- Returns:
- filter that can be applied when building a query for getting a list
-
-