From 126b7815d042ee1cc2997cbdd83445d4891ea16a Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 3 Dec 2012 23:08:40 +0100 Subject: [PATCH] js: Document parameter handling --- mopidy/frontends/http/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mopidy/frontends/http/__init__.py b/mopidy/frontends/http/__init__.py index fab5ff80..7697b60e 100644 --- a/mopidy/frontends/http/__init__.py +++ b/mopidy/frontends/http/__init__.py @@ -252,6 +252,11 @@ by looking at the method's ``description`` and ``params`` attributes: console.log(mopidy.playback.next.params); console.log(mopidy.playback.next.description); +JSON-RPC 2.0 limits method parameters to be sent *either* by-position or +by-name. Combinations of both, like we're used to from Python, isn't supported +by JSON-RPC 2.0. To further limit this, Mopidy.js currently only supports +passing parameters by-position. + Obviously, you'll want to get a return value from many of your method calls. Since everything is happening across the WebSocket and maybe even across the network, you'll get the results asynchronously. Instead of having to pass