UNPKG

n8n-nodes-kodi

Version:

A powerful n8n community node for controlling Kodi media center through JSON-RPC API with intelligent method discovery and comprehensive media management capabilities

45 lines (44 loc) 1.09 kB
export interface KodiCredentials { host: string; port: number; username: string; password: string; enableDiscovery?: boolean; discoveryTimeout?: number; } export interface JsonRPCRequest { jsonrpc: string; method: string; params?: any; id: string; } export interface JsonRPCResponse { jsonrpc: string; id: string; result?: any; error?: { code: number; message: string; data?: any; }; } export interface KodiMethod { name: string; description?: string; params?: any[]; returns?: any; } export declare class KodiService { private credentials; private baseUrl; private availableMethods; private methodsLoaded; constructor(credentials: KodiCredentials); private buildUrl; discoverMethods(): Promise<KodiMethod[]>; private getAvailableMethods; private getCommonMethods; makeRequest(request: JsonRPCRequest): Promise<JsonRPCResponse>; executeMethod(method: string, params?: any): Promise<any>; getMethodsByCategory(): Record<string, KodiMethod[]>; }