2017-03-01 18:47:52 +01:00
|
|
|
package org.schabi.newpipe.extractor;
|
|
|
|
|
2018-06-17 21:23:13 +02:00
|
|
|
import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudService;
|
2017-08-06 22:20:15 +02:00
|
|
|
import org.schabi.newpipe.extractor.services.youtube.YoutubeService;
|
2017-03-01 18:47:52 +01:00
|
|
|
|
2018-02-10 03:46:05 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import static java.util.Arrays.asList;
|
|
|
|
import static java.util.Collections.unmodifiableList;
|
|
|
|
|
2017-08-06 22:20:15 +02:00
|
|
|
/**
|
|
|
|
* A list of supported services.
|
2017-03-01 18:47:52 +01:00
|
|
|
*/
|
2018-02-10 03:46:05 +01:00
|
|
|
public final class ServiceList {
|
|
|
|
private ServiceList() {
|
|
|
|
//no instance
|
2017-08-06 22:20:15 +02:00
|
|
|
}
|
2017-03-01 18:47:52 +01:00
|
|
|
|
2018-06-17 21:23:13 +02:00
|
|
|
public static final YoutubeService YouTube;
|
|
|
|
public static final SoundcloudService SoundCloud;
|
2018-02-10 03:46:05 +01:00
|
|
|
|
2018-05-26 19:15:45 +02:00
|
|
|
private static final List<StreamingService> SERVICES = unmodifiableList(
|
2018-06-17 21:23:13 +02:00
|
|
|
asList(
|
|
|
|
YouTube = new YoutubeService(0),
|
|
|
|
SoundCloud = new SoundcloudService(1)
|
|
|
|
));
|
2018-02-10 03:46:05 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get all the supported services.
|
|
|
|
*
|
|
|
|
* @return a unmodifiable list of all the supported services
|
|
|
|
*/
|
|
|
|
public static List<StreamingService> all() {
|
|
|
|
return SERVICES;
|
2017-08-06 22:20:15 +02:00
|
|
|
}
|
2017-03-01 18:47:52 +01:00
|
|
|
}
|