2018-10-23, 22:28
Hi kodi community,
I recently revive an old project that i worked before without release it.
So i share this tool to have some comment/feedback in order to improve this library.
The kodi-client is a javascript library that help developper to perform RPC call on Kodi (via websocket or ajax).
This library is hightly configurable and come with great feature (middlewares, cache, logging)
https://github.com/instabledesign/kodi-client
Logging all the request
The response was put in the cache (Local storage)
Download and test the index.html and you'll see the power
I have some feature in the todo list (request validation, request editor, release ultra minimalist build...).
This library was made to listen/query kodi easily.
Feel free to comment.
I recently revive an old project that i worked before without release it.
So i share this tool to have some comment/feedback in order to improve this library.
The kodi-client is a javascript library that help developper to perform RPC call on Kodi (via websocket or ajax).
This library is hightly configurable and come with great feature (middlewares, cache, logging)
https://github.com/instabledesign/kodi-client
Logging all the request
The response was put in the cache (Local storage)
Download and test the index.html and you'll see the power
I have some feature in the todo list (request validation, request editor, release ultra minimalist build...).
This library was made to listen/query kodi easily.
javascript:
let kodi = Kodi.createClientRPC({uri: 'ws://localhost:9090'});
kodi.onReady.then(() => {
// do a request (VideoLibrary.GetMovies)
kodi.VideoLibrary.GetMovies().then(data => {
console.log(data); // data contains the response result
});
// listen (Player.OnResume)
kodi.Player.OnResume(data => {
console.log(data);// contain the event data like playerid, file etc
});
});
Feel free to comment.