Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

breadlesscode/KodiApi.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KodiApi.js

Javascript warpper for Kodi Websocket JSON-RPC API/v6

Documentation

It's a simple wrapper for the Kodi JSON-RPC Api. For more informations visit: http://kodi.wiki/view/JSON-RPC_API/v6

Usage/Examble

var api = new KodiApi('localhost', '9090');

api('application').setMute(); // for toggeling mute
api('application').setMute(true); // for muting

api('audiolibrary').getArtists().then(function(data) {
    console.log(data.result.artists);
});
// listen on rpc notifications
document.addEventListener('Player.OnPlay', function(event) {
    console.log(event.detail.params.data.item);
});
// change rpc notification callback (deafult throws JavaScript CustomEvents)
api.onNotification(function(data) {
    console.log(data);
});

Todo

  • write small wiki

License

This project is licensed under the MIT license. See License File for more information.

About

Javascript warpper for Kodi Websocket JSON-RPC API/v6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published