From d82c0cc960c51ad0a6d030bf34a7a9b2d1c8b82b Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 15 May 2014 21:16:01 +0200 Subject: [PATCH] docs: Add attribute getter/setter naming convention example --- docs/api/js.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api/js.rst b/docs/api/js.rst index 56d3c8a2..3044e4ec 100644 --- a/docs/api/js.rst +++ b/docs/api/js.rst @@ -150,7 +150,10 @@ from the call, the errback will be called with an error message. All methods in Mopidy's :ref:`core-api` is available via Mopidy.js. The core API attributes is *not* available, but that shouldn't be a problem as we've added (undocumented) getters and setters for all of them, so you can access the -attributes as well from JavaScript. +attributes as well from JavaScript. For example, the +:attr:`mopidy.core.PlaybackController.state` attribute is available in +JSON-RPC as the method ``core.playback.get_state`` and in Mopidy.js as +``mopidy.playback.getState()``. Both the WebSocket API and the JavaScript API are based on introspection of the core Python API. Thus, they will always be up to date and immediately reflect