Talk:JSON-RPC API

From Official Kodi Wiki
Jump to: navigation, search

1 -- Hints --

  • First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
    • yes, the /jsonrpc is mandatory (see xbmc code source ....)
  • the POST message could be :

{"jsonrpc":"2.0","method":"JSONRPC.Introspect","id":"introspect"}

--User:Divol|Divol 17:14, 24 February 2011 (UTC)

2 patch to be done CAudioLibrary::GetAlbums

ok, i know there's a place to note bugs. I am using this page as scrapbook...


JSON_STATUS CAudioLibrary::GetAlbums(const CStdString &method, ITransportLayer *transport, IClient *client, const Value &parameterObject, Value &result) { if (!(parameterObject.isObject() || parameterObject.isNull())) return InvalidParams;

const Value param = ForceObject(parameterObject);

 if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "albumid")));

to be replaced by

 

if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "genreid"))) //jd:

 


Ticket URL: <http://trac.xbmc.org/ticket/11275#comment:3>

— Preceding unsigned comment added by User:Divol|Divol (User talk:Divol|talkSpecial:Contributions/Divol|contribs)

3 AudioLibrary.getAlbums with params {"jsonrpc":"2.0","method":"AudioLibrary.GetAlbums","params":{"genreid": -1 ,"artistid": -1 ,"start": -1,"end": -1 }, "id":"AudioLibraryGetAlbums"}

returns a strange result :

{

  "id" : "AudioLibraryGetAlbums",
  "jsonrpc" : "2.0",
  "result" : {
     "end" : 0,
     "start" : 0,
     "total" : 95

}

— Preceding unsigned comment added by User:Divol|Divol (User talk:Divol|talkSpecial:Contributions/Divol|contribs)

4 I miss functions to browse Addons (especially audio/video) and Favourites

When playing with different XBMC remote applications on my iPhone, i missed the possiblity to browse my Audio/Video Addons or the Favourites. If I got it right, it's not a missing feature of these applications, but the current interface does not allow querying for addons/favourites at all. Am I wrong? Or is there a plan to add support for this? — Preceding unsigned comment added by User:Skandi|Skandi (User talk:Skandi|talkSpecial:Contributions/Skandi|contribs)

5 Cleanup

  • /v3|JSON-RPC API v3 (pre Eden) link (in overview) was going to V4 and I cant find V3 anywhere (since its a redirect) so I removed link it and updated JsonRPC nav template as well to reflect Frodo since its now feature freeze. -- uNiversal 11:46, 17 November 2012 (EST)
I'd just leave it for now. Montellese has a system or something in place, so I just leave it to him. For example, I don't know if maybe the final Frodo JSON-RPC will be called v6 or v5. -- Ned Scott 12:40, 17 November 2012 (EST)