Talk:JSON-RPC API
Jump to navigation
Jump to search
-- Hints --
- First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
- the generic http url is : http://user:pass@xbmcIP:xbmcPort/jsonrpc
- yes, the /jsonrpc is mandatory (see xbmc code source ....)
- the POST message could be :
{"jsonrpc":"2.0","method":"JSONRPC.Introspect","id":"introspect"}
--Divol 17:14, 24 February 2011 (UTC)
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 ¶meterObject, 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:
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
}