Talk:JSON-RPC API: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Divol
m (Fix dead links)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
-- Hints --
==-- Hints --==


* First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
* First : have a look to json RPC 2.0, it's not a joke, you'll win much time ! ( the "id", the "id" ...!)
Line 11: Line 11:
{"jsonrpc":"2.0","method":"JSONRPC.Introspect","id":"introspect"}
{"jsonrpc":"2.0","method":"JSONRPC.Introspect","id":"introspect"}


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


== patch to be done CAudioLibrary::GetAlbums ==
== patch to be done CAudioLibrary::GetAlbums ==
Line 29: Line 29:
<pre>
<pre>


  if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "genreid"))) //jd:
  if (!(ParameterIntOrNull(param, "artistid") || ParameterIntOrNull(param, "albumid")));
 
</pre>
</pre>


Line 37: Line 36:
<pre>  
<pre>  


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


</pre>
</pre>
Ticket URL: <http://trac.xbmc.org/ticket/11275#comment:3>
<small><span class="autosigned">— Preceding [[wikipedia:Wikipedia:Signatures|unsigned]] comment added by '''User:Divol|Divol''' ('''User talk:Divol|talk''' • '''Special:Contributions/Divol|contribs''') </span></small><!-- Template:Unsigned -->
== 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
}
<small><span class="autosigned">— Preceding [[wikipedia:Wikipedia:Signatures|unsigned]] comment added by '''User:Divol|Divol''' ('''User talk:Divol|talk''' • '''Special:Contributions/Divol|contribs''') </span></small><!-- Template:Unsigned -->
== 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? <small><span class="autosigned">— Preceding [[wikipedia:Wikipedia:Signatures|unsigned]] comment added by '''User:Skandi|Skandi''' ('''User talk:Skandi|talk''' • '''Special:Contributions/Skandi|contribs''') </span></small><!-- Template:Unsigned -->
==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. -- [[User:UNiversal|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. -- [[User:Ned Scott|Ned Scott]] 12:40, 17 November 2012 (EST)

Latest revision as of 07:24, 7 March 2018

-- 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)

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)

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)

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)

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)