Merge pull request #473 from Montellese/onplaybackspeedchanged
[vuplus_xbmc] / xbmc / interfaces / json-rpc / methods.json
1 {
2   "JSONRPC.Introspect": {
3     "type": "method",
4     "description": "Enumerates all actions and descriptions",
5     "transport": "Response",
6     "permission": "ReadData",
7     "params": [
8       { "name": "getdescriptions", "type": "boolean", "default": true },
9       { "name": "getmetadata", "type": "boolean", "default": false },
10       { "name": "filterbytransport", "type": "boolean", "default": true },
11       { "name": "filter", "type": "object",
12         "properties": {
13           "id": { "type": "string", "required": true, "description": "Name of a namespace, method or type" },
14           "type": { "type": "string", "required": true, "enum": [ "method", "namespace", "type", "notification" ], "description": "Type of the given name" },
15           "getreferences": { "type": "boolean", "default": true, "description": "Whether or not to print the schema for referenced types" }
16         }
17       }
18     ],
19     "returns": "object"
20   },
21   "JSONRPC.Version": {
22     "type": "method",
23     "description": "Retrieve the jsonrpc protocol version",
24     "transport": "Response",
25     "permission": "ReadData",
26     "params": [],
27     "returns": "string"
28   },
29   "JSONRPC.Permission": {
30     "type": "method",
31     "description": "Retrieve the clients permissions",
32     "transport": "Response",
33     "permission": "ReadData",
34     "params": [],
35     "returns": {
36       "type": "object",
37       "properties": {
38         "ReadData": { "type": "boolean", "required": true },
39         "ControlPlayback": { "type": "boolean", "required": true },
40         "ControlNotify": { "type": "boolean", "required": true },
41         "ControlPower": { "type": "boolean", "required": true },
42         "UpdateData": { "type": "boolean", "required": true },
43         "RemoveData": { "type": "boolean", "required": true },
44         "Navigate": { "type": "boolean", "required": true },
45         "WriteFile": { "type": "boolean", "required": true }
46       }
47     }
48   },
49   "JSONRPC.Ping": {
50     "type": "method",
51     "description": "Ping responder",
52     "transport": "Response",
53     "permission": "ReadData",
54     "params": [],
55     "returns": "string"
56   },
57   "JSONRPC.GetConfiguration": {
58     "type": "method",
59     "description": "Get client-specific configurations",
60     "transport": "Announcing",
61     "permission": "ReadData",
62     "params": [],
63     "returns": { "$ref": "Configuration" }
64   },
65   "JSONRPC.SetConfiguration": {
66     "type": "method",
67     "description": "Change the client-specific configuration",
68     "transport": "Announcing",
69     "permission": "ControlNotify",
70     "params": [
71       { "name": "notifications", "type": "object",
72         "properties": {
73           "Player": { "$ref": "Optional.Boolean" },
74           "GUI": { "$ref": "Optional.Boolean" },
75           "System": { "$ref": "Optional.Boolean" },
76           "AudioLibrary": { "$ref": "Optional.Boolean" },
77           "VideoLibrary": { "$ref": "Optional.Boolean" },
78           "Other": { "$ref": "Optional.Boolean" }
79         }
80       }
81     ],
82     "returns": { "$ref": "Configuration" }
83   },
84   "JSONRPC.NotifyAll": {
85     "type": "method",
86     "description": "Notify all other connected clients",
87     "transport": "Response",
88     "permission": "ReadData",
89     "params": [
90       { "name": "sender", "type": "string", "required": true },
91       { "name": "message", "type": "string", "required": true },
92       { "name": "data", "type": "any", "default": null }
93     ],
94     "returns": "any"
95   },
96   "Player.Open": {
97     "type": "method",
98     "description": "Start playback of either the playlist with the given ID, a slideshow with the pictures from the given directory or a single file or an item from the database.",
99     "transport": "Response",
100     "permission": "ControlPlayback",
101     "params": [
102       { "name": "item", 
103         "type": [
104           { "type": "object", "required": true, "additionalProperties": false,
105             "properties": {
106               "playlistid": { "$ref": "Playlist.Id", "required": true },
107               "position": { "$ref": "Playlist.Position", "default": 0 }
108             }
109           },
110           { "$ref": "Playlist.Item", "required": true },
111           { "type": "object", "required": true, "additionalProperties": false,
112             "properties": {
113               "path": { "type": "string", "required": true },
114               "random": { "type": "boolean", "default": true },
115               "recursive": { "type": "boolean", "default": true }
116             }
117           }
118         ]
119       }
120     ],
121     "returns": "string"
122   },
123   "Player.GetActivePlayers": {
124     "type": "method",
125     "description": "Returns all active players",
126     "transport": "Response",
127     "permission": "ReadData",
128     "params": [],
129     "returns": {
130       "type": "array",
131       "uniqueItems": true,
132       "items": { 
133         "type": "object",
134         "properties": {
135           "playerid": { "$ref": "Player.Id", "required": true },
136           "type": { "$ref": "Player.Type", "required": true }
137         }
138       }
139     }
140   },
141   "Player.GetProperties": {
142     "type": "method",
143     "description": "Retrieves the values of the given properties",
144     "transport": "Response",
145     "permission": "ReadData",
146     "params": [
147       { "name": "playerid", "$ref": "Player.Id", "required": true },
148       { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Player.Property.Name" } }
149     ],
150     "returns":  { "$ref": "Player.Property.Value", "required": true }
151   },
152         "Player.GetItem": {
153     "type": "method",
154     "description": "Retrieves the currently played item",
155     "transport": "Response",
156     "permission": "ReadData",
157     "params": [
158       { "name": "playerid", "$ref": "Player.Id", "required": true },
159       { "name": "properties", "$ref": "List.Fields.All" }
160     ],
161     "returns": { "type": "object",
162       "properties": {
163         "item": { "$ref": "List.Item.All", "required": true }
164       }
165     }
166   },
167   "Player.PlayPause": {
168     "type": "method",
169     "description": "Pauses or unpause playback and returns the new state",
170     "transport": "Response",
171     "permission": "ControlPlayback",
172     "params": [
173       { "name": "playerid", "$ref": "Player.Id", "required": true }
174     ],
175     "returns": { "$ref": "Player.Speed" }
176   },
177   "Player.Stop": {
178     "type": "method",
179     "description": "Stops playback",
180     "transport": "Response",
181     "permission": "ControlPlayback",
182     "params": [
183       { "name": "playerid", "$ref": "Player.Id", "required": true }
184     ],
185     "returns": "string"
186   },
187   "Player.SetSpeed": {
188     "type": "method",
189     "description": "Set the speed of the current playback",
190     "transport": "Response",
191     "permission": "ControlPlayback",
192     "params": [
193       { "name": "playerid", "$ref": "Player.Id", "required": true },
194       { "name": "speed", "type": [ "integer", "string" ], "enum": [ -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, "increment", "decrement" ], "required": true }
195     ],
196     "returns": { "$ref": "Player.Speed" }
197   },
198   "Player.Seek": {
199     "type": "method",
200     "description": "Seek through the playing item",
201     "transport": "Response",
202     "permission": "ControlPlayback",
203     "params": [
204       { "name": "playerid", "$ref": "Player.Id", "required": true },
205       { "name": "value", "required": true, "type": [
206           { "$ref": "Player.Position.Percentage", "required": true, "description": "Percentage value to seek to" },
207           { "type": "object", "additionalProperties": false, "required": true, "description": "Time to seek to",
208             "properties": {
209               "hours": { "type": "integer", "minimum": 0, "maximum": 23 },
210               "minutes": { "type": "integer", "minimum": 0, "maximum": 59 },
211               "seconds": { "type": "integer", "minimum": 0, "maximum": 59 },
212               "milliseconds": { "type": "integer", "minimum": 0, "maximum": 999 }
213             }
214           },
215           { "type": "string", "enum": [ "smallforward", "smallbackward", "bigforward", "bigbackward" ], "required": true, "description": "Seek by predefined jumps" }
216         ]
217       }
218     ],
219     "returns": {
220       "type": "object",
221       "properties": {
222         "percentage": { "$ref": "Player.Position.Percentage" },
223         "time": { "$ref": "Global.Time" },
224         "totaltime": { "$ref": "Global.Time" }
225       }
226     }
227   },
228   "Player.MoveLeft": {
229     "type": "method",
230     "description": "If picture is zoomed move viewport left otherwise skip previous",
231     "transport": "Response",
232     "permission": "ControlPlayback",
233     "params": [
234       { "name": "playerid", "$ref": "Player.Id", "required": true }
235     ],
236     "returns": "string"
237   },
238   "Player.MoveRight": {
239     "type": "method",
240     "description": "If picture is zoomed move viewport right otherwise skip next",
241     "transport": "Response",
242     "permission": "ControlPlayback",
243     "params": [
244       { "name": "playerid", "$ref": "Player.Id", "required": true }
245     ],
246     "returns": "string"
247   },
248   "Player.MoveDown": {
249     "type": "method",
250     "description": "If picture is zoomed move viewport down",
251     "transport": "Response",
252     "permission": "ControlPlayback",
253     "params": [
254       { "name": "playerid", "$ref": "Player.Id", "required": true }
255     ],
256     "returns": "string"
257   },
258   "Player.MoveUp": {
259     "type": "method",
260     "description": "If picture is zoomed move viewport up",
261     "transport": "Response",
262     "permission": "ControlPlayback",
263     "params": [
264       { "name": "playerid", "$ref": "Player.Id", "required": true }
265     ],
266     "returns": "string"
267   },
268   "Player.ZoomOut": {
269     "type": "method",
270     "description": "Zoom out once",
271     "transport": "Response",
272     "permission": "ControlPlayback",
273     "params": [
274       { "name": "playerid", "$ref": "Player.Id", "required": true }
275     ],
276     "returns": "string"
277   },
278   "Player.ZoomIn": {
279     "type": "method",
280     "description": "Zoom in once",
281     "transport": "Response",
282     "permission": "ControlPlayback",
283     "params": [
284       { "name": "playerid", "$ref": "Player.Id", "required": true }
285     ],
286     "returns": "string"
287   },
288   "Player.Zoom": {
289     "type": "method",
290     "description": "Zooms current picture",
291     "transport": "Response",
292     "permission": "ControlPlayback",
293     "params": [
294       { "name": "playerid", "$ref": "Player.Id", "required": true },
295       { "name": "value", "type": "integer", "required": true, "minimum": 1, "maximum": 10, "description": "Zoom level" }
296     ],
297     "returns": "string"
298   },
299   "Player.Rotate": {
300     "type": "method",
301     "description": "Rotates current picture",
302     "transport": "Response",
303     "permission": "ControlPlayback",
304     "params": [
305       { "name": "playerid", "$ref": "Player.Id", "required": true }
306     ],
307     "returns": "string"
308   },
309   "Player.GoPrevious": {
310     "type": "method",
311     "description": "Go to previous item on the playlist",
312     "transport": "Response",
313     "permission": "ControlPlayback",
314     "params": [
315       { "name": "playerid", "$ref": "Player.Id", "required": true }
316     ],
317     "returns": "string"
318   },
319   "Player.GoNext": {
320     "type": "method",
321     "description": "Go to next item on the playlist",
322     "transport": "Response",
323     "permission": "ControlPlayback",
324     "params": [
325       { "name": "playerid", "$ref": "Player.Id", "required": true }
326     ],
327     "returns": "string"
328   },
329   "Player.GoTo": {
330     "type": "method",
331     "description": "Go to item at the given position in the playlist",
332     "transport": "Response",
333     "permission": "ControlPlayback",
334     "params": [
335       { "name": "playerid", "$ref": "Player.Id", "required": true },
336       { "name": "position", "$ref": "Playlist.Position", "required": true }
337     ],
338     "returns": "string"
339   },
340   "Player.Shuffle": {
341     "type": "method",
342     "description": "Shuffle items in the player",
343     "transport": "Response",
344     "permission": "ControlPlayback",
345     "params": [
346       { "name": "playerid", "$ref": "Player.Id", "required": true }
347     ],
348     "returns": "string"
349   },
350   "Player.UnShuffle": {
351     "type": "method",
352     "description": "Unshuffle items in the player",
353     "transport": "Response",
354     "permission": "ControlPlayback",
355     "params": [
356       { "name": "playerid", "$ref": "Player.Id", "required": true }
357     ],
358     "returns": "string"
359   },
360   "Player.Repeat": {
361     "type": "method",
362     "description": "Set the repeat mode of the player",
363     "transport": "Response",
364     "permission": "ControlPlayback",
365     "params": [
366       { "name": "playerid", "$ref": "Player.Id", "required": true },
367       { "name": "state", "$ref": "Player.Repeat", "required": true }
368     ],
369     "returns": "string"
370   },
371   "Player.SetAudioStream": {
372     "type": "method",
373     "description": "Set the audio stream played by the player",
374     "transport": "Response",
375     "permission": "ControlPlayback",
376     "params": [
377       { "name": "playerid", "$ref": "Player.Id", "required": true },
378       { "name": "stream", "required": true, "type": [
379           { "type": "string", "enum": [ "previous", "next" ] },
380           { "type": "integer", "minimum": 0, "description": "Index of the audio stream to play" }
381         ]
382       }
383     ],
384     "returns": "string"
385   },
386   "Player.SetSubtitle": {
387     "type": "method",
388     "description": "Set the subtitle displayed by the player",
389     "transport": "Response",
390     "permission": "ControlPlayback",
391     "params": [
392       { "name": "playerid", "$ref": "Player.Id", "required": true },
393       { "name": "subtitle", "required": true, "type": [
394           { "type": "string", "enum": [ "previous", "next", "off", "on" ] },
395           { "type": "integer", "minimum": 0, "description": "Index of the subtitle to display" }
396         ]
397       }
398     ],
399     "returns": "string"
400   },
401   "Playlist.GetPlaylists": {
402     "type": "method",
403     "description": "Returns all existing playlists",
404     "transport": "Response",
405     "permission": "ReadData",
406     "params": [],
407     "returns": {
408       "type": "array",
409       "uniqueItems": true,
410       "items": { 
411         "type": "object",
412         "properties": {
413           "playlistid": { "$ref": "Playlist.Id", "required": true },
414           "type": { "$ref": "Playlist.Type", "required": true }
415         }
416       }
417     }
418   },
419   "Playlist.GetProperties": {
420     "type": "method",
421     "description": "Retrieves the values of the given properties",
422     "transport": "Response",
423     "permission": "ReadData",
424     "params": [
425       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
426       { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Playlist.Property.Name" } }
427     ],
428     "returns":  { "$ref": "Playlist.Property.Value", "required": true }
429   },
430   "Playlist.GetItems": {
431     "type": "method",
432     "description": "Get all items from playlist",
433     "transport": "Response",
434     "permission": "ReadData",
435     "params": [
436       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
437       { "name": "properties", "$ref": "List.Fields.All" },
438       { "name": "limits", "$ref": "List.Limits" },
439       { "name": "sort", "$ref": "List.Sort" }
440     ],
441     "returns": { "type": "object",
442       "properties": {
443         "limits": { "$ref": "List.LimitsReturned", "required": true },
444                                 "items": { "type": "array", "items": { "$ref": "List.Item.All" }, "required": true }
445       }
446     }
447   },
448   "Playlist.Add": {
449     "type": "method",
450     "description": "Add item(s) to playlist",
451     "transport": "Response",
452     "permission": "ControlPlayback",
453     "params": [
454       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
455       { "name": "item", "$ref": "Playlist.Item", "required": true }
456     ],
457     "returns": "string"
458   },
459   "Playlist.Insert": {
460     "type": "method",
461     "description": "Insert item(s) into playlist. Does not work for picture playlists (aka slideshows).",
462     "transport": "Response",
463     "permission": "ControlPlayback",
464     "params": [
465       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
466       { "name": "position", "$ref": "Playlist.Position", "required": true },
467       { "name": "item", "$ref": "Playlist.Item", "required": true }
468     ],
469     "returns": "string"
470   },
471   "Playlist.Remove": {
472     "type": "method",
473     "description": "Remove item from playlist. Does not work for picture playlists (aka slideshows).",
474     "transport": "Response",
475     "permission": "ControlPlayback",
476     "params": [
477       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
478       { "name": "position", "$ref": "Playlist.Position", "required": true }
479     ],
480     "returns": "string"
481   },
482   "Playlist.Clear": {
483     "type": "method",
484     "description": "Clear playlist",
485     "transport": "Response",
486     "permission": "ControlPlayback",
487     "params": [
488       { "name": "playlistid", "$ref": "Playlist.Id", "required": true }
489     ],
490     "returns": "string"
491   },
492   "Playlist.Swap": {
493     "type": "method",
494     "description": "Swap items in the playlist. Does not work for picture playlists (aka slideshows).",
495     "transport": "Response",
496     "permission": "ControlPlayback",
497     "params": [
498       { "name": "playlistid", "$ref": "Playlist.Id", "required": true },
499       { "name": "position1", "$ref": "Playlist.Position", "required": true },
500       { "name": "position2", "$ref": "Playlist.Position", "required": true }
501     ],
502     "returns": "string"
503   },
504   "Files.GetSources": {
505     "type": "method",
506     "description": "Get the sources of the media windows",
507     "transport": "Response",
508     "permission": "ReadData",
509     "params": [
510       { "name": "media", "$ref": "Files.Media", "required": true },
511       { "name": "limits", "$ref": "List.Limits" },
512       { "name": "sort", "$ref": "List.Sort" }
513     ],
514     "returns": {
515       "type": "object",
516       "properties": {
517         "limits": { "$ref": "List.LimitsReturned", "required": true },
518         "sources": { "$ref": "List.Items.Sources", "required": true }
519       }
520     }
521   },
522   "Files.Download": {
523     "type": "method",
524                 "description": "Provides a way to download a given file (e.g. providing an URL to the real file location)",
525     "transport": [ "Response", "FileDownload" ],
526     "permission": "ReadData",
527     "params": [
528       { "name": "path", "type": "string", "required": true }
529     ],
530     "returns": {
531       "type": "object",
532       "properties": {
533         "path": { "type": "string", "required": true }
534       }
535     }
536   },
537   "Files.GetDirectory": {
538     "type": "method",
539                 "description": "Get the directories and files in the given directory",
540     "transport": "Response",
541     "permission": "ReadData",
542     "params": [
543       { "name": "directory", "type": "string", "required": true },
544       { "name": "media", "$ref": "Files.Media", "default": "files" },
545       { "name": "properties", "$ref": "List.Fields.All" },
546       { "name": "sort", "$ref": "List.Sort" }
547     ],
548     "returns": {
549       "type": "object",
550       "properties": {
551         "limits": { "$ref": "List.LimitsReturned", "required": true },
552                                 "files": { "type": "array", "items": { "$ref": "List.Item.File" }, "required": true }
553       }
554     }
555   },
556   "AudioLibrary.GetArtists": {
557     "type": "method",
558     "description": "Retrieve all artists",
559     "transport": "Response",
560     "permission": "ReadData",
561     "params": [
562       { "name": "albumartistsonly", "$ref": "Optional.Boolean", "description": "Whether or not to include artists only appearing in compilations. If the parameter is not passed or is passed as null the GUI setting will be used" },
563       { "name": "genreid", "$ref": "Library.Id" },
564       { "name": "properties", "$ref": "Audio.Fields.Artist" },
565       { "name": "limits", "$ref": "List.Limits" },
566       { "name": "sort", "$ref": "List.Sort" }
567     ],
568     "returns": {
569       "type": "object",
570       "properties": {
571         "limits": { "$ref": "List.LimitsReturned", "required": true },
572         "artists": { "type": "array",
573           "items": { "$ref": "Audio.Details.Artist" }
574         }
575       }
576     }
577   },
578   "AudioLibrary.GetArtistDetails": {
579     "type": "method",
580     "description": "Retrieve details about a specific artist",
581     "transport": "Response",
582     "permission": "ReadData",
583     "params": [
584       { "name": "artistid", "$ref": "Library.Id", "required": true },
585       { "name": "properties", "$ref": "Audio.Fields.Artist" }
586     ],
587     "returns": { "type": "object",
588       "properties": {
589         "artistdetails": { "$ref": "Audio.Details.Artist" }
590       }
591     }
592   },
593   "AudioLibrary.GetAlbums": {
594     "type": "method",
595     "description": "Retrieve all albums from specified artist or genre",
596     "transport": "Response",
597     "permission": "ReadData",
598     "params": [
599       { "name": "artistid", "$ref": "Library.Id" },
600       { "name": "genreid", "$ref": "Library.Id" },
601       { "name": "properties", "$ref": "Audio.Fields.Album" },
602       { "name": "limits", "$ref": "List.Limits" },
603       { "name": "sort", "$ref": "List.Sort" }
604     ],
605     "returns": {
606       "type": "object",
607       "properties": {
608         "limits": { "$ref": "List.LimitsReturned", "required": true },
609         "albums": { "type": "array",
610           "items": { "$ref": "Audio.Details.Album" }
611         }
612       }
613     }
614   },
615   "AudioLibrary.GetAlbumDetails": {
616     "type": "method",
617     "description": "Retrieve details about a specific album",
618     "transport": "Response",
619     "permission": "ReadData",
620     "params": [
621       { "name": "albumid", "$ref": "Library.Id", "required": true },
622       { "name": "properties", "$ref": "Audio.Fields.Album" }
623     ],
624     "returns": { "type": "object",
625       "properties": {
626         "albumdetails": { "$ref": "Audio.Details.Album" }
627       }
628     }
629   },
630   "AudioLibrary.GetSongs": {
631     "type": "method",
632     "description": "Retrieve all songs from specified album, artist or genre",
633     "transport": "Response",
634     "permission": "ReadData",
635     "params": [
636       { "name": "artistid", "$ref": "Library.Id" },
637       { "name": "albumid", "$ref": "Library.Id" },
638       { "name": "genreid", "$ref": "Library.Id" },
639       { "name": "properties", "$ref": "Audio.Fields.Song" },
640       { "name": "limits", "$ref": "List.Limits" },
641       { "name": "sort", "$ref": "List.Sort" }
642     ],
643     "returns": {
644       "type": "object",
645       "properties": {
646         "limits": { "$ref": "List.LimitsReturned", "required": true },
647         "songs": { "type": "array",
648           "items": { "$ref": "Audio.Details.Song" }
649         }
650       }
651     }
652   },
653   "AudioLibrary.GetSongDetails": {
654     "type": "method",
655     "description": "Retrieve details about a specific song",
656     "transport": "Response",
657     "permission": "ReadData",
658     "params": [
659       { "name": "songid", "$ref": "Library.Id", "required": true },
660       { "name": "properties", "$ref": "Audio.Fields.Song" }
661     ],
662     "returns": { "type": "object",
663       "properties": {
664         "songdetails": { "$ref": "Audio.Details.Song" }
665       }
666     }
667   },
668   "AudioLibrary.GetRecentlyAddedAlbums": {
669     "type": "method",
670     "description": "Retrieve recently added albums",
671     "transport": "Response",
672     "permission": "ReadData",
673     "params": [
674       { "name": "properties", "$ref": "Audio.Fields.Album" },
675       { "name": "limits", "$ref": "List.Limits" },
676       { "name": "sort", "$ref": "List.Sort" }
677     ],
678     "returns": {
679       "type": "object",
680       "properties": {
681         "limits": { "$ref": "List.LimitsReturned", "required": true },
682         "albums": { "type": "array",
683           "items": { "$ref": "Audio.Details.Album" }
684         }
685       }
686     }
687   },
688   "AudioLibrary.GetRecentlyAddedSongs": {
689     "type": "method",
690     "description": "Retrieve recently added songs",
691     "transport": "Response",
692     "permission": "ReadData",
693     "params": [
694       { "name": "albumlimit", "$ref": "List.Amount", "description": "The amount of recently added albums from which to return the songs" },
695       { "name": "properties", "$ref": "Audio.Fields.Song" },
696       { "name": "limits", "$ref": "List.Limits" },
697       { "name": "sort", "$ref": "List.Sort" }
698     ],
699     "returns": {
700       "type": "object",
701       "properties": {
702         "limits": { "$ref": "List.LimitsReturned", "required": true },
703         "songs": { "type": "array",
704           "items": { "$ref": "Audio.Details.Song" }
705         }
706       }
707     }
708   },
709   "AudioLibrary.GetGenres": {
710     "type": "method",
711     "description": "Retrieve all genres",
712     "transport": "Response",
713     "permission": "ReadData",
714     "params": [
715       { "name": "properties", "$ref": "Library.Fields.Genre" },
716       { "name": "limits", "$ref": "List.Limits" },
717       { "name": "sort", "$ref": "List.Sort" }
718     ],
719     "returns": {
720       "type": "object",
721       "properties": {
722         "limits": { "$ref": "List.LimitsReturned", "required": true },
723         "genres": { "type": "array", "required": true,
724           "items": { "$ref": "Library.Details.Genre" }
725         }
726       }
727     }
728   },
729   "AudioLibrary.Scan": {
730     "type": "method",
731     "description": "Scans the audio sources for new library items",
732     "transport": "Response",
733     "permission": "UpdateData",
734     "params": [],
735     "returns": "string"
736   },
737   "AudioLibrary.Export": {
738     "type": "method",
739     "description": "Exports all items from the audio library",
740     "transport": "Response",
741     "permission": "WriteFile",
742     "params": [
743                         { "name": "options", "type": [
744                                         { "type": "object", "required": true, "additionalProperties": false,
745                                                 "properties": {
746                                                         "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
747                                                 }
748                                         },
749                                         { "type": "object", "required": true, "additionalProperties": false,
750                                                 "properties": {
751                                                         "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
752                                                         "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" }
753                                                 }
754                                         }
755                                 ]
756                         }
757     ],
758     "returns": "string"
759   },
760   "AudioLibrary.Clean": {
761     "type": "method",
762     "description": "Cleans the audio library from non-existent items",
763     "transport": "Response",
764     "permission": "RemoveData",
765     "params": [ ],
766     "returns": "string"
767   },
768   "VideoLibrary.GetMovies": {
769     "type": "method",
770     "description": "Retrieve all movies",
771     "transport": "Response",
772     "permission": "ReadData",
773     "params": [
774       { "name": "properties", "$ref": "Video.Fields.Movie" },
775       { "name": "limits", "$ref": "List.Limits" },
776       { "name": "sort", "$ref": "List.Sort" }
777     ],
778     "returns": {
779       "type": "object",
780       "properties": {
781         "limits": { "$ref": "List.LimitsReturned", "required": true },
782         "movies": { "type": "array",
783           "items": { "$ref": "Video.Details.Movie" }
784         }
785       }
786     }
787   },
788   "VideoLibrary.GetMovieDetails": {
789     "type": "method",
790     "description": "Retrieve details about a specific movie",
791     "transport": "Response",
792     "permission": "ReadData",
793     "params": [
794       { "name": "movieid", "$ref": "Library.Id", "required": true },
795       { "name": "properties", "$ref": "Video.Fields.Movie" }
796     ],
797     "returns": { "type": "object",
798       "properties": {
799         "moviedetails": { "$ref": "Video.Details.Movie" }
800       }
801     }
802   },
803   "VideoLibrary.GetMovieSets": {
804     "type": "method",
805     "description": "Retrieve all movie sets",
806     "transport": "Response",
807     "permission": "ReadData",
808     "params": [
809       { "name": "properties", "$ref": "Video.Fields.MovieSet" },
810       { "name": "limits", "$ref": "List.Limits" },
811       { "name": "sort", "$ref": "List.Sort" }
812     ],
813     "returns": { "type": "object",
814       "properties": {
815         "limits": { "$ref": "List.LimitsReturned", "required": true },
816         "sets": { "type": "array",
817           "items": { "$ref": "Video.Details.MovieSet" }
818         }
819       }
820     }
821   },
822   "VideoLibrary.GetMovieSetDetails": {
823     "type": "method",
824     "description": "Retrieve details about a specific movie set",
825     "transport": "Response",
826     "permission": "ReadData",
827     "params": [
828       { "name": "setid", "$ref": "Library.Id", "required": true },
829       { "name": "properties", "$ref": "Video.Fields.MovieSet" },
830       { "name": "movies", "type": "object",
831         "properties": {
832           "properties": { "$ref": "Video.Fields.Movie" },
833           "limits": { "$ref": "List.Limits" },
834           "sort": { "$ref": "List.Sort" }
835         }
836       }
837     ],
838     "returns": { "type": "object",
839       "properties": {
840         "setdetails": { "$ref": "Video.Details.MovieSet.Extended" }
841       }
842     }
843   },
844   "VideoLibrary.GetTVShows": {
845     "type": "method",
846     "description": "Retrieve all tv shows",
847     "transport": "Response",
848     "permission": "ReadData",
849     "params": [
850       { "name": "properties", "$ref": "Video.Fields.TVShow" },
851       { "name": "limits", "$ref": "List.Limits" },
852       { "name": "sort", "$ref": "List.Sort" }
853     ],
854     "returns": { "type": "object",
855       "properties": {
856         "limits": { "$ref": "List.LimitsReturned", "required": true },
857         "tvshows": { "type": "array",
858           "items": { "$ref": "Video.Details.TVShow" }
859         }
860       }
861     }
862   },
863   "VideoLibrary.GetTVShowDetails": {
864     "type": "method",
865     "description": "Retrieve details about a specific tv show",
866     "transport": "Response",
867     "permission": "ReadData",
868     "params": [
869       { "name": "tvshowid", "$ref": "Library.Id", "required": true },
870       { "name": "properties", "$ref": "Video.Fields.TVShow" }
871     ],
872     "returns": { "type": "object",
873       "properties": {
874         "tvshowdetails": { "$ref": "Video.Details.TVShow" }
875       }
876     }
877   },
878   "VideoLibrary.GetSeasons": {
879     "type": "method",
880     "description": "Retrieve all tv seasons",
881     "transport": "Response",
882     "permission": "ReadData",
883     "params": [
884       { "name": "tvshowid", "$ref": "Library.Id", "required": true },
885       { "name": "properties", "$ref": "Video.Fields.Season" },
886       { "name": "limits", "$ref": "List.Limits" },
887       { "name": "sort", "$ref": "List.Sort" }
888     ],
889     "returns": { "type": "object",
890       "properties": {
891         "limits": { "$ref": "List.LimitsReturned", "required": true },
892         "seasons": { "type": "array",
893           "items": { "$ref": "Video.Details.Season" }
894         }
895       }
896     }
897   },
898   "VideoLibrary.GetEpisodes": {
899     "type": "method",
900     "description": "Retrieve all tv show episodes",
901     "transport": "Response",
902     "permission": "ReadData",
903     "params": [
904       { "name": "tvshowid", "$ref": "Library.Id" },
905       { "name": "season", "type": "integer", "minimum": 0, "default": -1 },
906       { "name": "properties", "$ref": "Video.Fields.Episode" },
907       { "name": "limits", "$ref": "List.Limits" },
908       { "name": "sort", "$ref": "List.Sort" }
909     ],
910     "returns": { "type": "object",
911       "properties": {
912         "limits": { "$ref": "List.LimitsReturned", "required": true },
913         "episodes": { "type": "array",
914           "items": { "$ref": "Video.Details.Episode" }
915         }
916       }
917     }
918   },
919   "VideoLibrary.GetEpisodeDetails": {
920     "type": "method",
921     "description": "Retrieve details about a specific tv show episode",
922     "transport": "Response",
923     "permission": "ReadData",
924     "params": [
925       { "name": "episodeid", "$ref": "Library.Id", "required": true },
926       { "name": "properties", "$ref": "Video.Fields.Episode" }
927     ],
928     "returns": { "type": "object",
929       "properties": {
930         "episodedetails": { "$ref": "Video.Details.Episode" }
931       }
932     }
933   },
934   "VideoLibrary.GetMusicVideos": {
935     "type": "method",
936     "description": "Retrieve all music videos",
937     "transport": "Response",
938     "permission": "ReadData",
939     "params": [
940       { "name": "artistid", "$ref": "Library.Id" },
941       { "name": "albumid", "$ref": "Library.Id" },
942       { "name": "properties", "$ref": "Video.Fields.MusicVideo" },
943       { "name": "limits", "$ref": "List.Limits" },
944       { "name": "sort", "$ref": "List.Sort" }
945     ],
946     "returns": { "type": "object",
947       "properties": {
948         "limits": { "$ref": "List.LimitsReturned", "required": true },
949         "musicvideos": { "type": "array",
950           "items": { "$ref": "Video.Details.MusicVideo" }
951         }
952       }
953     }
954   },
955   "VideoLibrary.GetMusicVideoDetails": {
956     "type": "method",
957     "description": "Retrieve details about a specific music video",
958     "transport": "Response",
959     "permission": "ReadData",
960     "params": [
961       { "name": "musicvideoid", "$ref": "Library.Id", "required": true },
962       { "name": "properties", "$ref": "Video.Fields.MusicVideo" }
963     ],
964     "returns": { "type": "object",
965       "properties": {
966         "musicvideodetails": { "$ref": "Video.Details.MusicVideo" }
967       }
968     }
969   },
970   "VideoLibrary.GetRecentlyAddedMovies": {
971     "type": "method",
972     "description": "Retrieve all recently added movies",
973     "transport": "Response",
974     "permission": "ReadData",
975     "params": [
976       { "name": "properties", "$ref": "Video.Fields.Movie" },
977       { "name": "limits", "$ref": "List.Limits" },
978       { "name": "sort", "$ref": "List.Sort" }
979     ],
980     "returns": { "type": "object",
981       "properties": {
982         "limits": { "$ref": "List.LimitsReturned", "required": true },
983         "movies": { "type": "array",
984           "items": { "$ref": "Video.Details.Movie" }
985         }
986       }
987     }
988   },
989   "VideoLibrary.GetRecentlyAddedEpisodes": {
990     "type": "method",
991     "description": "Retrieve all recently added tv episodes",
992     "transport": "Response",
993     "permission": "ReadData",
994     "params": [
995       { "name": "properties", "$ref": "Video.Fields.Episode" },
996       { "name": "limits", "$ref": "List.Limits" },
997       { "name": "sort", "$ref": "List.Sort" }
998     ],
999     "returns": { "type": "object",
1000       "properties": {
1001         "limits": { "$ref": "List.LimitsReturned", "required": true },
1002         "episodes": { "type": "array",
1003           "items": { "$ref": "Video.Details.Episode" }
1004         }
1005       }
1006     }
1007   },
1008   "VideoLibrary.GetRecentlyAddedMusicVideos": {
1009     "type": "method",
1010     "description": "Retrieve all recently added music videos",
1011     "transport": "Response",
1012     "permission": "ReadData",
1013     "params": [
1014       { "name": "properties", "$ref": "Video.Fields.MusicVideo" },
1015       { "name": "limits", "$ref": "List.Limits" },
1016       { "name": "sort", "$ref": "List.Sort" }
1017     ],
1018     "returns": { "type": "object",
1019       "properties": {
1020         "limits": { "$ref": "List.LimitsReturned", "required": true },
1021         "musicvideos": { "type": "array",
1022           "items": { "$ref": "Video.Details.MusicVideo" }
1023         }
1024       }
1025     }
1026   },
1027   "VideoLibrary.GetGenres": {
1028     "type": "method",
1029     "description": "Retrieve all genres",
1030     "transport": "Response",
1031     "permission": "ReadData",
1032     "params": [
1033       { "name": "type", "type": "string", "required": true, "enum": [ "movie", "tvshow", "musicvideo"] },
1034       { "name": "properties", "$ref": "Library.Fields.Genre" },
1035       { "name": "limits", "$ref": "List.Limits" },
1036       { "name": "sort", "$ref": "List.Sort" }
1037     ],
1038     "returns": {
1039       "type": "object",
1040       "properties": {
1041         "limits": { "$ref": "List.LimitsReturned", "required": true },
1042         "genres": { "type": "array", "required": true,
1043           "items": { "$ref": "Library.Details.Genre" }
1044         }
1045       }
1046     }
1047   },
1048   "VideoLibrary.Scan": {
1049     "type": "method",
1050     "description": "Scans the video sources for new library items",
1051     "transport": "Response",
1052     "permission": "UpdateData",
1053     "params": [],
1054     "returns": "string"
1055   },
1056   "VideoLibrary.Export": {
1057     "type": "method",
1058     "description": "Exports all items from the video library",
1059     "transport": "Response",
1060     "permission": "WriteFile",
1061     "params": [
1062                         { "name": "options", "type": [
1063                                         { "type": "object", "required": true, "additionalProperties": false,
1064                                                 "properties": {
1065                                                         "path": { "type": "string", "required": true, "minLength": 1, "description": "Path to the directory to where the data should be exported" }
1066                                                 }
1067                                         },
1068                                         { "type": "object", "required": true, "additionalProperties": false,
1069                                                 "properties": {
1070                                                         "overwrite": { "type": "boolean", "default": false, "description": "Whether to overwrite existing exported files" },
1071                                                         "images": { "type": "boolean", "default": false, "description": "Whether to export thumbnails and fanart images" },
1072                                                         "actorthumbs": { "type": "boolean", "default": false, "description": "Whether to export actor thumbnails" }
1073                                                 }
1074                                         }
1075                                 ]
1076                         }
1077     ],
1078     "returns": "string"
1079   },
1080   "VideoLibrary.Clean": {
1081     "type": "method",
1082     "description": "Cleans the video library from non-existent items",
1083     "transport": "Response",
1084     "permission": "RemoveData",
1085     "params": [ ],
1086     "returns": "string"
1087   },
1088   "System.GetProperties": {
1089     "type": "method",
1090     "description": "Retrieves the values of the given properties",
1091     "transport": "Response",
1092     "permission": "ReadData",
1093     "params": [
1094       { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "System.Property.Name" } }
1095     ],
1096     "returns":  { "$ref": "System.Property.Value", "required": true }
1097   },
1098   "System.Shutdown": {
1099     "type": "method",
1100     "description": "Shuts the system running XBMC down",
1101     "transport": "Response",
1102     "permission": "ControlPower",
1103     "params": [],
1104     "returns": "string"
1105   },
1106   "System.Suspend": {
1107     "type": "method",
1108     "description": "Suspends the system running XBMC",
1109     "transport": "Response",
1110     "permission": "ControlPower",
1111     "params": [],
1112     "returns": "string"
1113   },
1114   "System.Hibernate": {
1115     "type": "method",
1116     "description": "Puts the system running XBMC into hibernate mode",
1117     "transport": "Response",
1118     "permission": "ControlPower",
1119     "params": [],
1120     "returns": "string"
1121   },
1122   "System.Reboot": {
1123     "type": "method",
1124     "description": "Reboots the system running XBMC",
1125     "transport": "Response",
1126     "permission": "ControlPower",
1127     "params": [],
1128     "returns": "string"
1129   },
1130   "Input.Left": {
1131     "type": "method",
1132     "description": "Navigate left in GUI",
1133     "transport": "Response",
1134     "permission": "Navigate",
1135     "params": [],
1136     "returns": "string"
1137   },
1138   "Input.Right": {
1139     "type": "method",
1140     "description": "Navigate right in GUI",
1141     "transport": "Response",
1142     "permission": "Navigate",
1143     "params": [],
1144     "returns": "string"
1145   },
1146   "Input.Down": {
1147     "type": "method",
1148     "description": "Navigate down in GUI",
1149     "transport": "Response",
1150     "permission": "Navigate",
1151     "params": [],
1152     "returns": "string"
1153   },
1154   "Input.Up": {
1155     "type": "method",
1156     "description": "Navigate up in GUI",
1157     "transport": "Response",
1158     "permission": "Navigate",
1159     "params": [],
1160     "returns": "string"
1161   },
1162   "Input.Select": {
1163     "type": "method",
1164     "description": "Select current item in GUI",
1165     "transport": "Response",
1166     "permission": "Navigate",
1167     "params": [],
1168     "returns": "string"
1169   },
1170   "Input.Back": {
1171     "type": "method",
1172     "description": "Goes back in GUI",
1173     "transport": "Response",
1174     "permission": "Navigate",
1175     "params": [],
1176     "returns": "string"
1177   },
1178   "Input.Home": {
1179     "type": "method",
1180     "description": "Goes to home window in GUI",
1181     "transport": "Response",
1182     "permission": "Navigate",
1183     "params": [],
1184     "returns": "string"
1185   },
1186   "Application.GetProperties": {
1187     "type": "method",
1188     "description": "Retrieves the values of the given properties",
1189     "transport": "Response",
1190     "permission": "ReadData",
1191     "params": [
1192       { "name": "properties", "type": "array", "uniqueItems": true, "required": true, "items": { "$ref": "Application.Property.Name" } }
1193     ],
1194     "returns":  { "$ref": "Application.Property.Value", "required": true }
1195   },
1196   "Application.SetVolume": {
1197     "type": "method",
1198     "description": "Set the current volume",
1199     "transport": "Response",
1200     "permission": "ControlPlayback",
1201     "params": [
1202       { "name": "volume", "type": "integer", "minimum": 0, "maximum": 100, "required": true }
1203     ],
1204     "returns": "integer"
1205   },
1206   "Application.SetMute": {
1207     "type": "method",
1208     "description": "Toggle mute/unmute",
1209     "transport": "Response",
1210     "permission": "ControlPlayback",
1211     "params": [
1212                         { "name": "mute", "required": true, "type": [
1213                                         { "type": "boolean", "required": true },
1214                                         { "type": "string", "enum": [ "toggle" ], "required": true }
1215                                 ]
1216                         }
1217                 ],
1218     "returns": { "type": "boolean", "description": "Mute state" }
1219   },
1220   "Application.Quit": {
1221     "type": "method",
1222     "description": "Quit application",
1223     "transport": "Response",
1224     "permission": "ControlPower",
1225     "params": [],
1226     "returns": "string"
1227   },
1228   "XBMC.GetInfoLabels": {
1229     "type": "method",
1230     "description": "Retrieve info labels about XBMC and the system",
1231     "transport": "Response",
1232     "permission": "ReadData",
1233     "params": [
1234       { "name": "labels", "type": "array", "required": true, "items": { "type": "string" }, "minItems": 1, "description": "See http://wiki.xbmc.org/index.php?title=InfoLabels for a list of possible info labels" }
1235     ],
1236     "returns": {
1237       "type": "object",
1238       "description": "List of key-value pairs of the retrieved info labels"
1239     }
1240   },
1241   "XBMC.GetInfoBooleans": {
1242     "type": "method",
1243     "description": "Retrieve info booleans about XBMC and the system",
1244     "transport": "Response",
1245     "permission": "ReadData",
1246     "params": [
1247       { "name": "booleans", "type": "array", "required": true, "items": { "type": "string" }, "minItems": 1 }
1248     ],
1249     "returns": {
1250       "type": "object",
1251       "description": "List of key-value pairs of the retrieved info booleans"
1252     }
1253   }
1254 }