UNPKG

rainlink-nico

Version:

A rainlink plugin that allows you to play music on apple

129 lines 3.25 kB
import { RainlinkPluginType } from 'rainlink'; import { RainlinkSearchOptions, RainlinkSearchResult } from 'rainlink'; import { RainlinkTrack } from 'rainlink'; import { Rainlink } from 'rainlink'; import { SourceRainlinkPlugin } from 'rainlink'; /** The rainlink nicovideo plugin options */ export interface NicoOptions { /** The number of how many track u want to resolve */ searchLimit: number; } export declare class RainlinkPlugin extends SourceRainlinkPlugin { /** * The options of the plugin. */ options: NicoOptions; private _search; private rainlink; private readonly methods; /** * Initialize the plugin. * @param nicoOptions Options for run plugin */ constructor(nicoOptions: NicoOptions); /** * Source identify of the plugin * @returns string */ sourceIdentify(): string; /** * Source name of the plugin * @returns string */ sourceName(): string; /** * Type of the plugin * @returns RainlinkPluginType */ type(): RainlinkPluginType; /** * load the plugin * @param rainlink The rainlink class */ load(rainlink: Rainlink): void; /** * Unload the plugin * @param rainlink The rainlink class */ unload(rainlink: Rainlink): void; /** Name function for getting plugin name */ name(): string; private search; /** * Directly search from plugin * @param query URI or track name query * @param options search option like RainlinkSearchOptions * @returns RainlinkSearchResult */ searchDirect(query: string, options?: RainlinkSearchOptions | undefined): Promise<RainlinkSearchResult>; private buildSearch; private searchTrack; private getTrack; private filterNullOrUndefined; private buildrainlinkTrack; private debug; } /** @ignore */ export interface Result { tracks: RainlinkTrack[]; name?: string; } /** @ignore */ export interface OwnerInfo { id: number; nickname: string; iconUrl: string; channel: string | null; live: { id: string; title: string; url: string; begunAt: string; isVideoLive: boolean; videoLiveOnAirStartTime: string | null; thumbnailUrl: string | null; } | null; isVideoPublic: boolean; isMylistsPublic: boolean; videoLiveNotice: null; viewer: number | null; } /** @ignore */ interface OriginalVideoInfo { id: string; title: string; description: string; count: { view: number; comment: number; mylist: number; like: number; }; duration: number; thumbnail: { url: string; middleUrl: string; largeUrl: string; player: string; ogp: string; }; rating: { isAdult: boolean; }; registerdAt: string; isPrivate: boolean; isDeleted: boolean; isNoBanner: boolean; isAuthenticationRequired: boolean; isEmbedPlayerAllowed: boolean; viewer: null; watchableUserTypeForPayment: string; commentableUserTypeForPayment: string; [key: string]: any; } /** @ignore */ export interface VideoInfo extends OriginalVideoInfo { owner: OwnerInfo; } export {}; //# sourceMappingURL=plugin.d.ts.map