Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1009 Bytes

README.md

File metadata and controls

46 lines (28 loc) · 1009 Bytes

kodi-socket

NPM Build Status

This is a Kodi/XBMC class that exposes the JSON-RPC API and notifications.

The API is defined based on JSON-RPC Introspection on the Kodi/XBMC server that you connect to. For full documentation of the available APIs refer to the Kodi wiki.

Installation

npm install --save kodi-socket

Usage

import Kodi from 'kodi-socket';

let kodi = new Kodi({
	host: 'localhost',
	port: 9999,
	connectImmediately: true
});

kodi.api.Player.PlayPause();

kodi.api.VideoLibrary.GetMovies().then( movies => { ... } );

// or
let movies = await kodi.api.VideoLibrary.GetMovies();

// or arbitrary commands with dot notated identifiers
kodi.execute('Input.Back');

Documentation

https://jamesism.github.io/kodi-socket/

License

MIT