XBMC Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



- nrgizer - 2011-07-11 11:00

OK, that's great to hear. Of course validation is always nice to have, so it's probably a good way to go. As long as the "future" comes before the final HTTP API removal, I'm all happy then Smile

Thanks for the reply.
-NRG


[windows] - jasonvp - 2011-07-16 12:54

Hi Guys,

New to this but I have XBMC on my laptop (windows XP) and have been testing JSON RPC commands using a TPC connection to port 9090 with Hercules. I have had success with most commands I have tested but can't get any of the "Input" commands to work.

Command e.g.
Code:
{"jsonrpc":"2.0","id": 3,"method":"Input.Home"}

Response
Code:
{
   "error" : {
      "code" : -32601,
      "message" : "Method not found."
   },
   "id" : 3,
   "jsonrpc" : "2.0"
}


Am I doing something wrong?


Cheers
Jason


- Montellese - 2011-07-16 16:22

jasonvp Wrote:Am I doing something wrong?

What version of XBMC are you using? Looks like you are either using the latest stable Dharma release or a very old pre-eden nightly build. The Input methods have been added a few weeks ago and are therefore only available in latest pre-eden nightly builds.


- jasonvp - 2011-07-16 16:31

Thanks for replying.

I am using 10.1 Dharma found here.

I'll try the latest build.


Cheers
Jason


- jasonvp - 2011-07-16 16:48

Working now.

Thanks again.


- Romep - 2011-07-17 15:19

Is there a way to get all possible elements of VideoLibrary.Fields.TVShow? They are not in the wiki.


- Montellese - 2011-07-17 15:47

Romep Wrote:Is there a way to get all possible elements of VideoLibrary.Fields.TVShow? They are not in the wiki.

Yes they are defined in the response from JSONRPC.Introspect. You can even try
Code:
{ "jsonrpc": "2.0", "method": "JSONRPC.Introspect", "params": { "filter": { "id": "VideoLibrary.Fields.TVShow", "type": "type" } }, "id": 1 }
and you should get the schema specification for VideoLibrary.Fields.TVShow only.


- Romep - 2011-07-17 16:12

Oh, i didn't see them. Several remotes offer a banner list of all tv shows. Thumbnail and fanart are too large for a banner. Do i have to get them manually or were they just not downloaded by my scraper?


- jasonvp - 2011-07-19 03:22

Can someone please give me an example of the parameters needed for "AudioLibrary.GetAlbumDetails" and "AudioLibrary.GetAlbums
"?

How do you know what the "Library.Id" is?

I have looked at the Introspect but I am struggling with it. Any help would great.


Cheers
Jason


- Montellese - 2011-07-19 08:39

"Library.Id" is a custom type that is defined in the json schema returned by JSONRPC.Introspect as well. What you can do is execute
Code:
{ "jsonrpc": "2.0", "method": "JSONRPC.Introspect", "params": { "filter": { "id": "Library.Id", "type": "type" } }, "id": 1 }
and you will only get the definition of "Library.Id". Basically "Library.Id" is a positive integer.

AudioLibrary.GetAlbums does not require any parameters but it can take the ID of an artist (retrieved through AudioLibrary.GetArtists) to only list the albums of a specific artist. AudioLibrary.GetAlbumDetails requires the ID of a specific album as a parameter.