docs: Add attribute getter/setter naming convention example
This commit is contained in:
parent
51b7ae4e94
commit
d82c0cc960
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user