NewPipeExtractor/extractor/src/main/java/org/schabi/newpipe/extractor/ServiceList.java

37 lines
970 B
Java
Raw Normal View History

2017-03-01 18:47:52 +01:00
package org.schabi.newpipe.extractor;
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
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
*/
public final class ServiceList {
private ServiceList() {
//no instance
2017-08-06 22:20:15 +02:00
}
2017-03-01 18:47:52 +01:00
public static final YoutubeService YouTube;
public static final SoundcloudService SoundCloud;
private static final List<StreamingService> SERVICES = unmodifiableList(
asList(
YouTube = new YoutubeService(0),
SoundCloud = new SoundcloudService(1)
));
/**
* 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
}