From 7b6735b9af87ba1e6ce2f54f98438872c152ad43 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Thu, 15 May 2014 21:22:27 +0200 Subject: [PATCH] docs: Split out HTTP server side API --- docs/api/http-server.rst | 9 +++++++++ docs/api/http.rst | 32 +++++++++++--------------------- docs/api/index.rst | 1 + 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 docs/api/http-server.rst diff --git a/docs/api/http-server.rst b/docs/api/http-server.rst new file mode 100644 index 00000000..0f55d650 --- /dev/null +++ b/docs/api/http-server.rst @@ -0,0 +1,9 @@ +******************** +HTTP server side API +******************** + +TODO: Describe how this is used. Consider splitting this page into multiple +pages. + +.. autoclass:: mopidy.http.Router + :members: diff --git a/docs/api/http.rst b/docs/api/http.rst index 88206c86..366c0a78 100644 --- a/docs/api/http.rst +++ b/docs/api/http.rst @@ -1,21 +1,21 @@ .. _http-api: -******** -HTTP API -******** +***************** +HTTP JSON-RPC API +***************** .. module:: mopidy.http :synopsis: The HTTP frontend APIs -The :ref:`ext-http` extension makes Mopidy's :ref:`core-api` available over -HTTP using WebSockets. We also provide a JavaScript wrapper, called -:ref:`Mopidy.js ` around the HTTP API for use both from browsers and -Node.js. +The :ref:`ext-http` extension makes Mopidy's :ref:`core-api` available using +JSON-RPC over HTTP using HTTP POST and WebSockets. We also provide a JavaScript +wrapper, called :ref:`Mopidy.js `, around the JSON-RPC over +WebSocket API for use both from browsers and Node.js. .. warning:: API stability - Since the HTTP API exposes our internal core API directly it is to be - regarded as **experimental**. We cannot promise to keep any form of + Since the HTTP JSON-RPC API exposes our internal core API directly it is to + be regarded as **experimental**. We cannot promise to keep any form of backwards compatibility between releases as we will need to change the core API while working out how to support new use cases. Thus, if you use this API, you must expect to do small adjustments to your client for every @@ -25,16 +25,6 @@ Node.js. stable. -Server side API -=============== - -TODO: Describe how this is used. Consider splitting this page into multiple -pages. - -.. autoclass:: mopidy.http.Router - :members: - - .. _websocket-api: WebSocket API @@ -51,7 +41,7 @@ server. Both message types are encoded as JSON objects. Event messages --------------- +============== Event objects will always have a key named ``event`` whose value is the event type. Depending on the event type, the event may include additional fields for @@ -64,7 +54,7 @@ fields on the event objects. Example event message:: JSON-RPC 2.0 messaging ----------------------- +====================== JSON-RPC 2.0 messages can be recognized by checking for the key named ``jsonrpc`` with the string value ``2.0``. For details on the messaging format, diff --git a/docs/api/index.rst b/docs/api/index.rst index 291b0e7c..444b6ece 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -26,5 +26,6 @@ API reference ext config zeroconf + http-server http js