newpipe-extractor-js
Version:
JavaScript/Node.js port of NewPipeExtractor
62 lines • 1.74 kB
TypeScript
import { Downloader } from './Downloader';
import { StreamingService } from './StreamingService';
import { Locale } from '../types';
export declare class NewPipe {
private static downloader;
private static services;
private static preferredLocalization;
private static preferredContentCountry;
/**
* Initialize NewPipe with a downloader
*/
static init(downloader: Downloader): void;
/**
* Get the downloader instance
*/
static getDownloader(): Downloader;
/**
* Register a streaming service
*/
static registerService(service: StreamingService): void;
/**
* Get a service by ID
*/
static getService(serviceId: number): StreamingService;
/**
* Get a service by name
*/
static getServiceByName(serviceName: string): StreamingService;
/**
* Get all registered services
*/
static getServices(): StreamingService[];
/**
* Get the service that handles a given URL
*/
static getServiceByUrl(url: string): StreamingService;
/**
* Set the preferred localization
*/
static setPreferredLocalization(localization: Locale): void;
/**
* Get the preferred localization
*/
static getPreferredLocalization(): Locale;
/**
* Set the preferred content country
*/
static setPreferredContentCountry(contentCountry: Locale): void;
/**
* Get the preferred content country
*/
static getPreferredContentCountry(): Locale;
/**
* Get version information
*/
static getVersion(): string;
/**
* Check if a URL is supported by any service
*/
static isUrlSupported(url: string): boolean;
}
//# sourceMappingURL=NewPipe.d.ts.map