Skip to content

Commit e50c23d

Browse files
committed
Update main prose
General cleanup, as well as fixing up some inaccuracies (for example, Mopidy no longer bundles Mopdiy.js).
1 parent 0d92ea3 commit e50c23d

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

mopidy_api_explorer/static/index.html

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,43 @@
4141
<h1>WebSocket endpoint</h1>
4242

4343
<p>
44-
Mopidy has a WebSocket endpoint at <code>/mopidy/ws</code>. You
45-
can use this end point to access Mopidy's full API, and to get
46-
notified about events happening in Mopidy
47-
<a href="https://docs.mopidy.com/en/develop/api/http/#websocket-api" target="_blank" rel="noopener">more info</a>.
44+
Mopidy has a WebSocket endpoint at <code>/mopidy/ws</code>.
45+
You can use this endpoint to access Mopidy's full API, and
46+
to get notified about events happening in Mopidy.
47+
<br>
48+
<a href="https://docs.mopidy.com/en/latest/api/http/#websocket-api" target="_blank" rel="noopener">More info</a>
4849
</p>
4950
</div>
5051

5152
<div class="box">
5253
<h1>HTTP POST RPC endpoint</h1>
5354

5455
<p>
55-
Mopidy has a WebSocket endpoint at <code>/mopidy/rpc</code>. You
56-
can use this end point to access Mopidy's full API.
57-
However you can't listen to events via this endpoint
58-
<a href="https://docs.mopidy.com/en/develop/api/http/#http-post-api" target="_blank" rel="noopener">more info</a>.
56+
Mopidy has a non-WebSocket API endpoint at <code>/mopidy/rpc</code>.
57+
You can use this endpoint to access Mopidy's full API.
58+
While you can't listen to events via this endpoint, it
59+
doesn't require maintaining a persistent connection.
60+
<br>
61+
<a href="https://docs.mopidy.com/en/latest/api/http/#http-post-api" target="_blank" rel="noopener">More info</a>
5962
</p>
6063
</div>
6164

6265
<div id="api-intro" class="box">
63-
<h1>Javascript API</h1>
66+
<h1>JavaScript API</h1>
67+
68+
<p>
69+
Mopidy.js is an official library that provides full access to the
70+
JSON-RPC API via the WebSocket endpoint. For Mopidy extensions, it
71+
will automatically connect to the WebSocket endpoint with no constructor
72+
arguments. The examples on this page initiate a connection using the
73+
following script:
74+
</p>
75+
<div class="mb-3 p-2 border rounded">
76+
<pre>window.mopidy = new Mopidy();</pre>
77+
</div>
6478
<p>
65-
You can use JS library shipped with mopidy to access
66-
full Mopidy API. For more info visit
67-
<a href="https://docs.mopidy.com/en/develop/api/js/" target="_blank" rel="noopener">mopidy.js</a> docs.
68-
However examples on this page initiate a connection using the following script:
79+
More info can be found at the <a href="https://docs.mopidy.com/en/latest/api/js/" target="_blank" rel="noopener">Mopidy.js documentation</a>
6980
</p>
70-
<pre>window.mopidy = new Mopidy();</pre>
7181
</div>
7282

7383
<div id="api-methods" class="box navbar-target">

0 commit comments

Comments
 (0)